2D Mobile Game: Running Jump Animation

Ryan McCoach
3 min readMar 26, 2022

--

Intro

In this article, we will cover how to add additional transition conditions to the animation tree to create a running jump animation.

Animation Fix

The jump animation was choppy and we want to make it shorter and cleaner. We deleted the old jump animation and for the new jump animation we are only going to use a select 8 frames.

The first 6 frames will happen in the first 6 milliseconds, but we will elongate the 7 frame to create the suspension in the air before the last frame of landing will be played at the 2 second mark.

This creates a less convoluted animation and makes the jumping mechanic snappier and more responsive.

Animation Transitions

Currently, we are only transitioning to either the Run or Jump animation from the Idle animation. The condition from the Idle to Run is determine by the float parameter, Moving, which is determined by the horizontal input. The condition from the Idle to Jump is determine by a bool parameter, Jumping, which is controlled by pressing the space bar.

In order to have a Running Jump, we are going to have to be able to make transitions between the Run and Jump animation that combines the parameters of both Moving and Running.

We want to transition from Run to Jump when both the Move parameter is greater than 0.1, which means we are moving AND the Jump parameter is true, meaning the space bar was pressed.

We are going to want to transition back to running after we have jumped, so we keep the Move condition the same, but the Jumping will be false since we are no longer jumping.

Now we have a running jump animation!

--

--

No responses yet