Post

Replies

Boosts

Views

Activity

SCNNode Pivot and Position
Hi, I am initializing a SCNNode from a OBJ file. Let's suppose the object is a sphere, and its pivot after loading it from the OBJ file is the bottom of the sphere (where it would rest on the floor). Its default position is the zero vector. However, I must change the pivot to the center of the sphere. After doing so (based on its bbox), since the position is still the zero vector, does that mean that the object was translated so that the new pivot lies at (0,0,0)? Or should set its position to (0,0,0), which will now be based on the new pivot? To test whether this is needed, I am using a separate button to change the node's position to (0,0,0) after changing its pivot, but I do not see any change visually, which leads me to believe that after changing the pivot, the object is automatically moved to (0,0,0) based on its new pivot. This is probably done faster than the scene renders which is why I do not notice any difference between the two methods. I cannot tell which of the two is correct, meaning that I do no know whether I should set the position again to (0,0,0) after changing the pivot or not. Right now it seems like it makes no difference. Any thoughts?
1
0
639
Jul ’24