Game Development Reference
In-Depth Information
20. Make the transition from the Run animation cycle back to the Idle cycle by
following the same procedure. Right-click on the Run animation to start the
transition. Then, left-click on Idle . After this, left-click on the transition once it
is locked into place. Then, when the transition is activated in Conditions , set
its speed to less than 0.09 .
Congratulations! Our character will now transition from Idle to Run when the speed
crosses the 0.1 threshold. The transition is a nice blend from the first animation to
the second over a brief period of time, and this is indicated in the transition graph.
Exploring in-place versus root motion animation
There are two ways of moving a character in a 3D world: using the in-place animation
and the root animation. Each technique has some benefits and drawbacks depend-
ing on the effect you want to achieve. In a complicated character system, you may
use both of these in different places.
• With the in-place animation, the character hierarchy is animated by the anim-
ation, whereas the root note of the character is not. To move your character
about an axis, you need to move the root node in your script. Rotations to the
root node of the character model will result in rotations to the character (and
all the child objects of the character's hierarchy in the skeleton).
• With the root motion animation, both the character's hierarchy and the root
node are animated by the animation. This means that you (as a programmer)
need not translate nor rotate the root node about an axis because your an-
imator will be responsible for doing that. Hence, this is a popular choice for
some games but not all.
• Since our Run animation does not have root motion in it, we will move our
character around in the script.
Search WWH ::




Custom Search