What Beats Jumping? Double Jumping!!

Chase Mitchell
May 29, 2021

--

Here’s a quick guide on implementing double jump functionality into your character controller.

We’ve completed the basic setup for our character controller and we can move left/right and jump as needed. However, a platformer wouldn’t be complete without a double jump so here’s a quick run-through on how to set that up.

There is our original jump code. We can create a double jump function by checking a bool variable in our else statement:

When we jump from the ground, canDoubleJump becomes true, and if we press space again we add an additional jump height and then set canDoubleJump back to false.

Easy peasy. Our player can now double jump all over the place and we’re ready to move on to collectibles. See ya there!

--

--

Chase Mitchell
Chase Mitchell

Written by Chase Mitchell

Unity Developer from Los Angeles, CA

No responses yet