Edge detection

This is getting a bit hard, but since Im a beginner in UE4 im asking for some help. ¿How Do I detect a gap or an edge of a wall? I already did it with walls, just a single sphere trace, but now what with the edges?. Im thinking that adding positive and negative Z limits when detecting collision might work. However do you guys ¿Know something about? Oh and before you throw me another topic of edge grabbing from a UE4 forum, don’t do it, I’ve read it a lot of times, and I can’t catch what’s going on, because they’re using variables that their values are unknown.

Thanks.

It’s ok guys, I already figured it out.

How do you detect the gap?

I would also like to know a simpler approach for this, currently I am using two traces, one tracing forward, another from above at the end of the forward trace. Can it be done with less?

Firstly you need to make a definition of edges and gaps. Maybe it’s possible to use Line Trace function to detect if the ground is smooth or if there is something in front of your character. Simply use Hit Location in Hit Result structure.