I need help to configure a box collision

My character has a box collision on his head (watch video).
And i need the box to hit the walls (like a solid).
That is, when hitting the wall (static mesh), the character should not be able to move.
And the box collision should not go through the wall.

What should I change in the confuguration to get that behavior?(watch images).

Please, if this is not possible, let me know. I have spent many hours trying to get this behavior. In that case I will give up trying.

Thank you so much!!

I’ve tried many configurations but I can’t get it to do that.
the following images correspond to the current configuration of the box.


Hey Ivan,

You’re banging your head against the wall here, like literally. The characters were never designed to work like this so you will need to code such behaviour from scratch. Sadly, no amount of fiddling with collision settings can fix that.

The movement component only cares about the root of the actor - the capsule, and that’s the only element used for blocking collision.

That is, when hitting the wall (static mesh), the character should not be able to move.

You could either use an overlapping collision volume to react to the surrounding and stop the character from moving closer or rotating.

Or, better, sphere / box trace and stop the character when they get close enough. This technique is often used for procedural movement and physical animation where you detect stuff around you before you run into it.

You could experiment with (very exaggerated here) something like this:

Essentially, you continuously detect obstacles in the direction you’re moving and if one is found, you react to it. This way you can start a jumping animation early, before the character gets to the fence. I’m simplifying greatly but that’s the gist.

Be prepared for a lot of work to make it work the way you need.


Thank you very much for the explanation, for the video, for the example code, and especially for your time. Your help will be very useful for me. Very much appreciated!!

1 Like