Getting ready

To use root motion for steering, you need to prepare a character with at least four animations: Idle, WalkForward, WalkLeft, and WalkRight. WalkRight and WalkLeft should make the character walk in circles (clockwise and counterclockwise). You don't need to create a full circle, just make sure that the start and end poses of the animation look similar. As always, all the animations should have contact points of the feet in the same normalized time. Make sure not to switch the left and right foot. If you start the WalkForward animation with the left foot forward, both WalkLeft and WalkRight animations should also start with the left foot forward, as shown in the following screenshot:

Steering animations using root motion

You can also use the example project; go to the Chapter 04 Character movementRecipe 03 Using root motion to steer a character directory. You can find the Example.unity scene there, with a Humanoid character already animated in the scene's Hierarchy. You can start the game and use the WSAD keys to move the character relative to the camera. In the Rigs directory, you can find the Humanoid.fbx character with all the required animations.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.228.99