DaniDevy / FPS_Movement_Rigidbody

A physics based movement system
MIT License
492 stars 642 forks source link

doesnt block jumping when midair #4

Open portal007gms opened 4 years ago

portal007gms commented 4 years ago

so i used these scripts in my game, and made a few parkour levels, but when testing them i quickly realised you can jump when you are midair. i looked into the movement script and saw that there is a thing that blocks the jumping when midair, but it doesnt work (for me). anyone knows how to fix?

macc1995 commented 4 years ago

being grounded is set to false after 3 seconds of not being on ground because the delay is set to 3f in the OnCollisionStay method. I think its is by accident, and should be a lower amount. setting it somewhere around 0.03f (i guess this was the intended value) will make it work as it should (at least it did for me)