Game Development Reference
In-Depth Information
the center of the body. In Blender the default vertical axis is the z axis. The
red and green lines in Figure 2.11a and 2.11b represent the x and y axes,
respectively. When imported into Unity, the software automatically flips the
z axis for you, making y the new vertical axis. As shown in Figure 2.11a and
2.11b , the origin of the model is carried across into Unity. When a model
is selected, its origin is evident by the location of the translation handles
used for moving the model around in the Scene. The location of the model's
central point becomes an issue in Unity when positioning and rotating it.
In Figure 2.11e , both models are placed in the world at (0,0,0) as set by the
Inspector. As you can see, the models are placed in differing positions relative
to their own central points. Figure 2.11f demonstrates how rotation is also
affected by the model's origin. The model from Figure 2.11a rotates about
the point in the center top of the head, whereas the model in Figure 2.11b
rotates about its abdomen.
In Figure 2.12 , the effect of rotations on local and world coordinate systems
is illustrated. Any object at the world origin when rotated will orientate in
the same way around local and world axes. However, when the model is
not at the world origin, a rotation in world coordinates will move as well as
reorient the model. Local rotations are not affected by the model's location
in the world.
y
x
90 degree rotation
around world
y axis
90 degree rotation
around local
y axis
90 degree rotation
around world or local
y axis when object at the origin
z
Fig 2.12 Local and world rotations affected by a model's position.
Search Nedrilad ::




Custom Search