RedditPP Mascot

RedditPP

r/unrealengine • … • u/CaveManning

Collision trace: is it possible to ignore initial hit from touching but stop penetration?

I have an actor following the cursor around on a plane using box traces to check for collisions with walls, but when it hits a wall and lines up flush with it the next trace registers an initial overlap because the collisions are touching and the actor gets stuck. Is it possible to ignore these kinds of hits and still produce the expected "Location" result?

There's probably some hacky way to work around it like getting the normal of the trace, making sure it's not trying to penetrate the object it's touching, then run the trace again with a slight offset along that normal, but this seems like a situation where there's probably a solution built into the engine somewhere.

— 0