Game Development Reference
In-Depth Information
6. Switch to Main Camera and set the desired distance from 4 to 10 .
Congratulations! Our main character model now walks about or stays idle according
to the user input. Feel free to experiment with scaling the size of the Justin model
and the speed of the player's motion in PlayerControls.cs to fine tune the speed
and to reduce feet sliding.
Building a zombie racer animation FSM
Let's build an FSM that the racers in mission 2 will use. To start, let's develop the
locomotion system.
1. Load the TESTBED2 scene.
2. We will turn the racers into zombies for this level (this will motivate the player
to run fast!). Drag-and-drop the Zombie model into the scene and scale it up
to 3 . Drag-and-drop the Zombie model on top of the RacerA GameObject.
Do the same for another instance of Zombie but parent it to RacerB .
3. Create a new AnimationController object to drive the zombie's Mech-
anim FSM. Name the controller ZombieControllerA . Drag-and-drop the
controller into the reference slot on the animator controller to associate it with
Mechanim.
4. Click on RacerA , then click on the Animator tab to view the Mechanim pre-
view panel.
5. Go back to www.mixamo.com to download and import the following two zom-
bie movement animations. We will use different animations because each
racer has a unique speed:
Search WWH ::




Custom Search