Game Development Reference
In-Depth Information
Root Motion
Whereas animation involves the movement of the character's head, body, and limbs relative to
itself, Root Motion involves the movement of the character relative to game world coordinates. For
example, you will see that the zombie walking animation without Root Motion gives you a character
walking in place, whereas the walkingWithMotion animation with Root Motion gives you a character
that has a forward movement in the game scene. Like the animation movements, whether or not an
animation contains Root Motion is determined in the creation of the character and animation prior to
import into Unity.
Select the Animations tab. Notice at the bottom there is a Preview where you can play the animation.
Pay attention to the grid of the plane the zombie character is standing on and notice that the zombie
is walking in place.
Scroll down in the Inspector until you see where you can check Loop Time and, immediately
underneath it, Loop Pose. For Root Transform Rotation, check Bake Into Pose, then set Based Upon
to Body Orientation. Next, for Root Transform Position (Y) check Bake Into Pose and, beneath it, set
Based Upon (at Start) to Original. For Root Transform Position (XZ) leave Bake Into Pose unchecked.
Finally, click Apply (Figure 5-32 ).
 
Search WWH ::




Custom Search