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 create a simple Action Point, follow these steps:

  1. Import the character to Unity.
  2. Put it on the scene and add a NavMesh Agent component to it.
  3. Bake the NavMesh in the scene.
  4. Create an Animator Controller and assign it to the character's Animator component.
  5. Create a float Speed parameter and a Trigger Action parameter in the controller.
  1. Drag and drop the IdleWalk, and Action animations to the controller. Make sure that the Idle animation is the default state.
  2. Create four transitions (see the following image):
    • IdleWalk with one condition: Speed parameter greater than 0.5. Has Exit Time should be set to false and TransitionDuration set to around 0.1 seconds.
    • WalkIdle with one condition: Speed parameter less than ...

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