- Home /
GameObject position and orientation in the 3D environment.
To what reference the orientation and position of a GameObject are calculated (from where exactly to where) ? center of object ? is there like a coordinate system defined with the game object ? How and where ?
Answer by xxmariofer · Jan 31, 2019 at 11:46 AM
I imagine that coordinate system you mean the trasnform component which has position and rotaion that are the locals to the parents, every game object has a transform. and the position is calculated from the pivot of the object, unity gameobjects (like cube and sphere) pivot are in the middle of the model, but you can create your own models outside unity with your desired pivots.
How about the orientation ? it's relative to the camera's coordinate system ? I mean once you drag and drop a 3D model for example, how does it decide the initial transform component of an object ?
the pivot not only has a position but also a rotation, you can export the same exact model but one with the pivot rotated 180, you will see the first would look to the front and the second to the back, since 3d model tools also have x y z axis.
I think the OP wants to know where is positioned an object when you drag it from Project to Hierarchy, because it's not always at 0,0,0.