[HELP NEEDED] UBoxComponent Collision Issues

I have a Box Component located above the head of my character. When my character releases the Crouch Key, I want the Box Component to detect if it’s colliding with another object, and stop the character from coming out of a Crouch State.

So far, my Box Component only partially works. It can detect the capsule collider of my character using GetOverlappingActors() and then checking if Index 0 is valid, but if my character stands underneath a static cube the Box Component isn’t returning anything. Is this because it’s a child of the Capsule Collider of my Character? I’m pretty new to Unreal, so any pointers or suggestions would be very much appreciated.

Is it really colliding? Is everything the right height? Can you show the code?

Everything was the right height. I never figured out the solution, but I changed my method of detecting objects above the player’s head from using a box component to LineTraceByChannel and Raycasting.

For some clarification, the box component was only colliding with components that were also on that character, so I had wondered if maybe the type of objects it could collide with had somehow been limited to only that Actor the box component was placed on. I’ve lost the code as I’ve replaced it, otherwise I’d show you what I had going on.


how did you do that? i have the same issue.