Making a Double Jump

Now that we have a basic player movement, it’s time for making a double jump.

Create a bool variable called _doubleJump.

We want to use double jump when we are not grounded. After jumping we will set _doubleJump to true to allow a double jump.

We need to check if the player hit the space key again when falling (isGrounded = false) and if double jump is set to true. Next we double jump and set _doubleJump to false.

--

--