How to do it...

To organize States into Sub-State Machines, please follow these steps:

  1. Create a new 3D project and import the Mixing Unity Package, as well as the FBX files Swat@turn_right_45_degrees.fbx and Swat@turn_left.fbx.
  2. Then, from the Project panel, open the mecanimPlayground level.
  3. We need to configure the Animation Clips. Select the Swat@turn_left asset in the Project panel.
  4. Choose the Rig section. Change Animation Type to Humanoid and Avatar Definition to Create From this Model. Confirm by clicking on Apply.
  5. Now, choose the Animations section. The turn_left clip should be selected. Click the Clamp Range button to adjust the timeline and check the Loop Time option. Under Root Transform Rotation, check Bake Into Pose and navigate ...

Get Unity 2018 Cookbook - Third Edition 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.