Adding Double-Jump To My 2.5D Platformer
Today I am giving the player the ability to jump once while airborne, a common stable of many platformers.

Today’s Objective: Extend on the Player Controller to add the ability to double jump (jump from ground, then jump again once while in mid-air).
The Code:
In the PlayerController component, I add 2 new variables which will control the additional jumps:

Then in the Update method where I check “_isGrounded”, I add another jump input check when not grounded:

I also reset the airjumps used whenever the player lands or jumps from ground.

These methods are simply called through an Update check like so:
