Game Development Reference
In-Depth Information
Figure 6-8. The Root node of the ZombieBunny
The Root node is the node of the object that moves it in the scene. With Mecanim, that velocity
can be used to move the object or turned off to let outside sources move the object. Transforms on
children of the node will continue to work as animated.
4.
Click Apply.
5.
In the Animations section, rename Take 001 to Bunny Eat .
6.
Click Play in the Preview window to watch the animation.
In the Legacy animation, objects go into the scene at the first frame of their imported animation.
Mecanim is just the opposite; those objects will go into the scene at their final frame's position. If
the object has a run or walk behavior and the final frame was at the end of that transform, the object
will be offset to that location when you put it into the scene. The problem comes when you try to
fit a collider to it. The collider will be (and must be) at the start location, making it difficult to get
it properly aligned. To avoid this problem, the final five or so frames of the total animation should
putting the character or object back to its starting position.
In the ZombieBunny's animation, the last 10 frames are used to return it to its start position, so they
must be cropped from the animation for it to loop properly.
7.
Set the End value of the clip to 110 .
8.
Check Loop Time to set the clip's wrap mode to loop.
9.
Check “Bake Into Pose” for “Root Transform Position (Y)” (Figure 6-9 ).
 
Search WWH ::




Custom Search