How do I stop my character uncrouching if he will collide with something?

Hi everyone,

My character is now able to crouch and uncrouch without problems. Crouching is enabled in the defaults to allow him to get through spaces he would be unable to get through whilst standing.

My problem is that when he uncrouches whilst underneath an object he will just go straight through the object regardless of collsion. I need to stop him for being able to uncrouch if there is an object underneath him.

I tried to do a line trace to check if there was something above me and stop uncrouching from working if there was, but I’m very new to unreal and that either not the solution or I just can’t figure out how to actually. Can anyone help me out here?

The more detail the better (A picture of how I would do this in a blueprint graph would be awesome) but any help would be great and very much appreciated

Sorry just re-read this and I meant “I need to stop him for being able to uncrouch if there is an object above him”


So you try to create ‘smooth’ crouch, right?

To.prevent uncrouch under some obstacles I do sphere trace by visibility channel. Sphere have the same size as character capsule radius and trace distance is equal to ‘standing’ capsule.

Thank you for this! It’s exactly what I was looking for and worked immediately!