Game Development Reference
In-Depth Information
The gnome does a relative position repeat thanks to Mecanim and heads out of the view instead of
jumping back to the same position every time the clip loops.
Because the travel clip was dropped in first, it became the default clip. The gnome goes right
through the other objects because he does not have a collider. You will get him hooked up so he
can be player-controlled in the game shortly. Let's go ahead and change the default state to the idle
animation.
7.
Right-click over the Gnome idle state control, and choose Set As Default.
8.
Click Play again, and switch to the Scene view to get a close view of the
gnome.
This time the gnome vibrates expectantly in place as the pulley spins around.
To see how Mecanim transitions between states, you will have to add a couple of Transitions. You
won't really need them for the gnome, but it will be a first look to get an idea about how powerful
Mecanim can be.
1.
Stop Play mode.
2.
Right-click over the Gnome idle control/label in the Animator view, and
choose Make Transition (Figure 6-20 ).
Figure 6-20. The Make Transition option in the right-click menu
3.
Click on the Gnome travel control to finish the transition.
4.
Click on “Gnome travel,” and create a transition back to “Gnome idle”
(Figure 6-21 ).
 
Search WWH ::




Custom Search