How to add Double Jump to your Game

We continue to manage the behavior of our player, in each platform, the jump can not miss and why not also the double jump.

Thanks to our Character Controller we have a method that automatically recognizes the collision with the lower part of our capsule. This greatly simplifies our work since we can immediately define that to make the jump we must first touch the ground, but it does not help us particularly with the double jump, but we will get to that in a moment.

to manage the double jump we add a bool variable that enables the possibility to repeat the action even in mid-air and is immediately reset to the initial value to prevent making trivial mistakes