How to do it...

To use root motion for off-mesh links, follow these steps:

  1. Import the character with Idle, WalkLeft, WalkForward, WalkRight, and JumpOffMesh animations.
  2. Create a new Animator Controller.
  3. Right-click on the empty space of the controller and choose Create State | New From Blend Tree. We need two such states. Name one of them Idle and the second one Steering.
  4. Create two float parameters in the controller, Speed and Direction, and one bool parameter, JumpOffMesh.
  5. Create two transitions:
    • Idle | Steering with one condition: Speed parameter value greater than 0.5. Has Exit Time should be set to false and Transition Duration set to around 0.2 seconds.
    • Steering | Idle with one condition: Speed parameter value less than 0.5. Has Exit ...

Get Unity 5.x Animation Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.