Fixing the double jump (lesson's challenge)

I did it slightly different by defining a ResetJump() method that I called instead in ApplyJumpForce():

 private void ResetJump()
    {
        _timeInAir = 0f;
        _rigidBody.velocityY = 0f;
    }

And this leads me to my question: Should we really set the velocity to zero, or shouldn’t we rather just set the vertical velocity to zero, but keep the horizontal velocity as it is?
(Which is what I did)

Nice work!
Apologies again for missing the tag on this but i think your way is slightly cleaner way of doing things

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms