The game I'm working on is a platformer, in which you hold the Jump button to crouch and release it to jump. I've got the jump itself working fine, the problem is that while Jump is being held the player continues to "run" as long as the player holds the left or right movement button, effectively letting players slide in a crouch position all over the level. The only solution I could find was to set Horizontal Movement Speed to 0, but that's no good either, then they just stop instantly when they hold Jump. I need them to slide while crouching, I just want the game to make them slow to a stop, rather than still be able to move as much as they want. Anybody able to help?
Develop games in your browser. Powerful, performant & highly capable.
you could set a variable "isJumping" to 1 when he's jumping. Then only allow movement when isjumping is off.
i think theres also an option to ignore player input?