Adding the running jump animation in Unity

Jaime
3 min readNov 14, 2021

--

We already have idle and running animation. This time around we will animate running and jumping at the same time. From Mixamo, we will get a “Running Jump” animation.

After importing to Unity, again we need to change the rig from Generic to Humanoid.

Also, we will make the animation loop:

You need to run before doing a running jump. Therefore, there needs to be a transition from Running to Running Jump. On the other hand, when the player reaches the ground it can either continue running or stop in its place.

I’ve added a boolean called Jumping to check if the Player is Jumping while on the Running state.

However, when the Player reaches the ground, the boolean, Jumping needs to be set to False and depending on Speed whether animation will transition to Idle or Running.

In the code, all I needed to do is to add the Jump state when the player is able to press Spacebar while the player is on the ground and set it back to false when the Player hits the ground.

Now, the transitions from Running -> Jumping -> Idle and Running -> Jumping -> Running are seamless.

--

--

Jaime
Jaime

No responses yet