O'Reilly logo

Unity 5.x Animation Cookbook by Maciej Szcześnik

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

To use root motion for steering, follow these steps:

  1. Import your character with Idle, WalkForward, WalkLeft, and WalkRight root motion animations into Unity.
  2. Select the character asset file and go to the Inspector. Make sure the Animation Type is set properly for your character (Generic or Humanoid). If you are using a Generic character, make sure to set its Root Node.
  3. Go to the Animation tab and select the Idle animation. Select all the Bake Into Pose options and set the Base Upon option of the Root Transform Rotation to Original.
  4. For the WalkForward animation, select the same options as for the Idle animation, but uncheck Bake Into Pose for Root Transform Position (XZ).
  1. For the WalkLeft and WalkRight animations, set all ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required