Day 86: How to add Double Jump to your Game

Tyler Smallwood
2 min readSep 13, 2021

Objective: Allow the player to double jump!

In the last article we got the player moving around and jumping. Today is implementing the double jump! Today will be a quick one.

The first thing we need will be a bool that tells us if we can double jump.

Now in the section where we check for input from the player, we will set the bool to true.

The script is now letting us double jump, now we need to check to see if we can and then double jump. In our else section we will check for input again and than check to see if doubleJump is true.

If it is true, we will add on more jumpHeight to the cached yVelocity and true the bool back to false.

And that’s it! Our player can complete double jumps now! Thank you for reading and have a wonderful day!

--

--

Tyler Smallwood

I am passonate on learning to program and use Unity to become a skillful Unity Developer