Download

Need help with character crouching...

I made my first person character crouch by changing the capsule half height on key press, but whenever i un-crouch while the character is inside a vent or under a table, he clips though and gets stuck on the other mesh. I checked the collisions of the character and meshes and they are set to block all, is there something i missed? Can I also disable the crouch key when the character is in small spaces?

Any help is appreciated.

Hi, one way you can get around this would be to first fire a Sphere Trace from your character in the upward direction, when the Uncrouch button is pressed. If it registers a blocking hit within your standing height distance, you don’t do anything. If no obstacles are detected, you can continue with the Uncrouch logic.

I’ll give it a try, thanks!

Edit: It works perfectly, thank you for the advice!