# Edge detection

**URL:** <https://forums.unrealengine.com/t/edge-detection/294605>\
**Category:** World Creation\
**Tags:** detection, edge, unreal-engine, FeatureRequest, Physics, Collision, Blueprint, question\
**Created:** [September 26, 2014, 1:42am UTC](https://forums.unrealengine.com/t/edge-detection/294605 "2014-09-26T01:42:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_4bbf8dca](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4bbf8dca](https://forums.unrealengine.com/u/anonymous_user_4bbf8dca)\
**Post date:** [September 26, 2014, 1:42am UTC](https://forums.unrealengine.com/t/edge-detection/294605/1 "2014-09-26T01:42:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4bbf8dca](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4bbf8dca](https://forums.unrealengine.com/u/anonymous_user_4bbf8dca)\
**Post date:** [September 27, 2014, 5:05am UTC](https://forums.unrealengine.com/t/edge-detection/294605/2 "2014-09-27T05:05:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Leviboy98](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Leviboy98](https://forums.unrealengine.com/u/Leviboy98)\
**Post date:** [August 13, 2015, 6:49pm UTC](https://forums.unrealengine.com/t/edge-detection/294605/3 "2015-08-13T18:49:23Z")

</div>

How do you detect the gap?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c44ea37c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c44ea37c](https://forums.unrealengine.com/u/anonymous_user_c44ea37c)\
**Post date:** [January 24, 2016, 11:58am UTC](https://forums.unrealengine.com/t/edge-detection/294605/4 "2016-01-24T11:58:13Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ed54c79a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ed54c79a](https://forums.unrealengine.com/u/anonymous_user_ed54c79a)\
**Post date:** [November 11, 2019, 5:19pm UTC](https://forums.unrealengine.com/t/edge-detection/294605/5 "2019-11-11T17:19:20Z")

</div>

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.
