Reader small image

You're reading from  Unity 5.x Animation Cookbook

Product typeBook
Published inMay 2016
Reading LevelExpert
PublisherPackt
ISBN-139781785883910
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Maciej Szczesnik
Maciej Szczesnik
author image
Maciej Szczesnik

Not interested. Too busy with current game project. Source: Linkedin.
Read more about Maciej Szczesnik

Right arrow

Making a character jump with 3-phase animation


In this recipe, we will make our character jump. Jumping is best done with physics, so we will use this approach.

Getting ready

Before we start, you should add three more animations to your character: a short Jump animation starting on the ground in a pose similar to Idle; an InAir animation, a looped animation of the character being in the air; and a Land animation starting when the character touches the ground with his feet and ending with the Idle pose. All those animations should be done "in place" without root node translation. You can open the provided example Unity project and go to the Chapter 04 Character movement\Recipe 06 Making a character jump with 3-phase animation directory. You will find an Example.unity scene there. Play the game and press the space bar to see the character jump. You will find all the animations needed in the Rigs directory.

How to do it...

To make the character jump, follow these steps:

  1. Import the character and...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity 5.x Animation Cookbook
Published in: May 2016Publisher: PacktISBN-13: 9781785883910

Author (1)

author image
Maciej Szczesnik

Not interested. Too busy with current game project. Source: Linkedin.
Read more about Maciej Szczesnik