lock uncrouch


how can i make it that if it detects something is above the normal capsule height it will lock uncrouching until nothing is above it anymore?

Try a line trace coming out of the top of the head a few feet. Or a box collision over the head to detect if it overlaps with anything.

Hey there @DezeLGi! Welcome back to the community! I agree with USA’s recommendation. Though the Character Movement Component actually does this on it’s own. It will attempt to uncrouch, and if it would hit something it won’t uncrouch until it comes out from under it. However it does it automatically and you have no control over the action. You can overlay a system like this on top of it to avoid even calling uncrouch and triggering the automatic system, but it has some weirdness if you do this trace before the capsule Sweep goes off and gets a different result.

Alternatively you could adjust the current automatic system, but you’d have to adjust the Character Movement Component in C++.

1 Like