Knowing the distance while you crouch

You can do a line trace from the foot of the character to 250-300 units(a bit higher than the character’s standing height) up in Z axis, and use the bool output of that line trace to see if it is ok to stand up or not. Make sure you do the trace only when you are crouching so that you dont have to check it all the time.

Hello guys.
I created a simple system for the “crouch”, where you press a button (SPACE) and the character crouches, and once you release the character back to the previous state.
My problem is that if the character is in a space while crouched down, and release the SPACE key, he stops because obviously does not have enough space.
Is there a way, perhaps with EVENT TICK, to know constantly if the space on the Z axis is enough to go up?
Thank you and sorry for bad English

Surely I’m wrong because I do not use often line trace, but in this case the return value is always false


Hmm. Enable Trace Complex as well, and set trace channel to Camera. See how that goes.

Ok, with trace complex works perfectly, thank you very much :slight_smile: