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 be able to grab a cliff's edge while jumping, follow these steps:

  1. Import your character to Unity. Make sure your character can move and jump (follow the Making a character jump with 3-phase animation recipe if needed). The character should use a Rigidbody component for moving and jumping. You can still use root motion to move and steer the character.
  2. Place the character in your scene and make sure it has the Player tag set.
  3. You need to have a cliff to be able to grab its edge. Import a suitable model or use a Cube from the Game Object | 3D Object | Cube menu. The cliff game object should have a collider (Mesh Collider for example) because we use a Rigid Body character.
  4. Add a trigger game object (an empty game object with ...

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