- Home /
Question by
Dapeze · Dec 13, 2020 at 02:19 PM ·
c#c# tutorial
How do you make it so when you jump you can't jump again for a certain amount of time?
How do you make it so when you jump you can't jump again for a certain amount of time? I didn't know how to code jumping and gravity and all that so I watched a tutorial but it didn't work. So how do I add all of that stuff?
Comment
If you mean how to jump only when on the ground, if you use the character controller component you can check isGrounded
Answer by gipsnichmeer · Dec 13, 2020 at 02:53 PM
First you check if a bool is true For the jump you have to use rb.addforce(0,jumpPower,0); Then you set the bool to false and Invoke a Method wich sets the bool back to true