How to add Double Jump to your Game

Kyle W. Powers
Jun 19, 2021

Using the Player script created in the previous article that uses a Character Controller component, we will add a double jump feature for the Player.

Implementing a double is relatively simple since we already have a regular jump. To add the double jump capability, we need to add a bool to know if we can double jump; this will turn on and off the ability to double jump.

When the Player jumps from the ground, we tell the script the Player can double jump. Then if the space key is hit again when the Player is not on the ground, and they can double jump, we add the jump height to the stored y-axis velocity and make it so the Player can no longer double jump.

Now the Player can reach the highest Platform using double jump.

--

--