Game Development Reference
In-Depth Information
Running in Place
When the animation for Kila is played in-game, it's the game code that will actually cause
her to move. So we now need to alter our animation, removing her forward movement. (If
you animated the character without this forward movement, you can skip this section.)
Normally, removing the forward movement would involve editing the Root_Control and
both foot controls' Translate Z attributes, working out where they should be at specific
times—as you can imagine, this can be a very difficult and time-consuming task. To make
this much easier, I have supplied a script on the GCDM shelf called Spot . As long as you
have followed the same naming conventions I have used during the creation of the rig, this
script will pull the animation back for you.
Note
If you are using a different rig or if your names are different, you can
simply rename the main controls to Root_Control, LeftFoot, and
RightFoot, and the script will work. When you're done with this task, you
can change the names back to the ones you prefer.
All the Spot script does is work out the distance of each foot from the hips on each key-
frame. The keys are then pulled back while maintaining this offset. You can do this just as
easily using the Graph Editor, but it will take a while longer to complete.
Once you've run the script, all you need to do is make sure the first and last keys (0 and
32) are exactly the same, to ensure that the loop is seamless.
You can see both Kila and Grae's walk cycles by loading the files Kila_Walk.mb and
Grae_Walk.mb from the CD. You will also find a selection of QuickTime movies in this
chapter's Movies directory, showing both characters walking from different views.
Animation Archive
Keeping all your previous animation works in an archive will add efficiency to all your an-
imation projects. These archives can then be called upon when needed, potentially saving
you days of work.
Because we have built character sets into our characters (see Chapter 15 ) , we can use these
toexporttheanimationdataandimportotheranimationsontotheKilaandGraecharacters.
We do this using the Trax Editor.
The Trax Editor is a fantastic tool for manipulating existing animations. Each animation is
stored as a clip, which can then be imported onto a character to create whole sequences of
Search WWH ::




Custom Search