Game Development Reference
In-Depth Information
With the Generic Rig type, you got your first look at Mecanim and a basic Animator set up to get
the Zombie Bunny chewing its way through the scene. Mecanim, you discovered, turns clips into
states and was designed especially for looping animations that are always active. Generic rigs, you
discovered, are used for characters with fewer than 11 bones and non-humanoid characters. With
the zombie bunny, you found that to access Mecanim's state engine, you had to create an Animator
controller. Unlike the process you used for the Legacy animation, you had to set up the Animator
before you could see the character animate in the scene, but for a simple looping animation, it
required no coding.
The second character also used the Generic rig and had no bones at all in its hierarchy. You left the
gnome transitioning between two clips using their “Exit Times” to trigger the states. By designating a
clip as the Default state, you could control the state that was used first. The most important concept
you experienced was that the root node animation, if separated from the rest of the animation,
can be used to move the character about the scene. Root node animation, whether translation or
rotation, you learned, was additive—the character kept moving forward rather than jumping back to
its start point.
With the Scarecrow character, you got a first look at a Humanoid Animation Type rig. Although
the character had no animation of its own, its rigging allowed it to be configured by Mecanim's
retargeting system, where its bones were identified and you could set up limits for the limbs' range
of movement. With the Scarecrow prepared, you looked into the SCAnimation object that had no
mesh, but a humanoid skeleton and some animations. With the help of Dude, Unity's default avatar,
you discovered the extra features to help define the frames for looping animation behaviors. You also
discovered that the velocity of clips could be seen for clips of Humanoid rigs.
With a Humanoid to control, you learned the basics of setting up conditionals using “Parameters,”
which are variables used to communicate with scripts. In the script, you used the values returned by
the virtual Input keys as conditions to trigger the transitions between states.
Returning to a Generic rig for the Slug character, you saw how Unity can use BlendShapes (a.k.a.,
morph targets). By changing the slug's shader to Unlit, you found you could save a few resources.
The slug also provided a nice example to help understand the concept of Bake Into Pose. You
discovered that the morph shapes reside as parameters on the Skinned Mesh Renderer and can be
adjusted in percents added to the original mesh.
With the last “character,” you got a chance to create your own animations in Unity's Animation view.
The first thing you learned was that objects with position animations must be parented to an empty
gameObject before you create animation clips for it. Beginning with the Dope Sheet, you learned
how to set keys and adjust the timing of the clip. Switching to the curve editor, you learned how
to manipulate the tangents to fine-tune the animation. Once a clip was created for an object with
the Generic Rig, you discovered that an Animator Controller was generated and the new clip was
automatically added to it.
Search WWH ::




Custom Search