# Need to access overlap data in construction script

**URL:** <https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654>\
**Category:** Blueprint\
**Tags:** overlap, collision-detection, unreal-engine, construction-script, Blueprint, question\
**Created:** [August 4, 2015, 7:20pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654 "2015-08-04T19:20:31Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_a1d09d07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a1d09d07](https://forums.unrealengine.com/u/anonymous_user_a1d09d07)\
**Post date:** [August 4, 2015, 7:20pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/1 "2015-08-04T19:20:31Z")

</div>

I have an absolute need to get overlap data during the evaluation of the construction script, yet this appears to not work. I can add nodes such as “Get Overlapping Components” to a construction script, but they will _always_ return an empty overlap result, even if there is in fact an overlap.

This is a very important requirement for my work however, so I need to find a way to implement testing for overlaps in the construction script.

---

<div class="post-metadata">

**Author:** ![Mhousse1247](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mhousse1247](https://forums.unrealengine.com/u/Mhousse1247)\
**Post date:** [August 4, 2015, 8:20pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/2 "2015-08-04T20:20:40Z")

</div>

Here is it

 ![52833-test01.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/4/9441f72bc9d1d96c5f12c4d825b33328312610bd.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a1d09d07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a1d09d07](https://forums.unrealengine.com/u/anonymous_user_a1d09d07)\
**Post date:** [August 4, 2015, 10:00pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/3 "2015-08-04T22:00:54Z")

</div>

I have tried that as well. I have tried, to my knowledge, every node that deals with overlap, but none of them work in the construction script. They all return an empty result even if there is an overlap.

---

<div class="post-metadata">

**Author:** ![Mhousse1247](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mhousse1247](https://forums.unrealengine.com/u/Mhousse1247)\
**Post date:** [August 4, 2015, 10:11pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/4 "2015-08-04T22:11:33Z")

</div>

I tested it and and it’s working without any problem , make sure, your Primitive component is generating overlap events

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a1d09d07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a1d09d07](https://forums.unrealengine.com/u/anonymous_user_a1d09d07)\
**Post date:** [August 4, 2015, 10:16pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/5 "2015-08-04T22:16:55Z")

</div>

Maybe the problem is all my components are generated dynamically?

---

<div class="post-metadata">

**Author:** ![Mhousse1247](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mhousse1247](https://forums.unrealengine.com/u/Mhousse1247)\
**Post date:** [August 4, 2015, 10:29pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/6 "2015-08-04T22:29:50Z")

</div>

what’s the type of the generated components?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a1d09d07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a1d09d07](https://forums.unrealengine.com/u/anonymous_user_a1d09d07)\
**Post date:** [August 4, 2015, 10:34pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/7 "2015-08-04T22:34:01Z")

</div>

StaticMeshComponent and overlap events as well as collision are set to on when they are created.

---

<div class="post-metadata">

**Author:** ![Mhousse1247](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mhousse1247](https://forums.unrealengine.com/u/Mhousse1247)\
**Post date:** [August 4, 2015, 10:45pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/8 "2015-08-04T22:45:50Z")

</div>

check if your static mesh has collision

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a1d09d07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a1d09d07](https://forums.unrealengine.com/u/anonymous_user_a1d09d07)\
**Post date:** [August 4, 2015, 10:49pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/9 "2015-08-04T22:49:01Z")

</div>

It does. I’ve checked all of the obvious things 🙂 I have been fighting with this for over a week now. I have found old posts that indicate that overlap events simply don’t work in the construction script at all, so I am surprised you can get it working.

---

<div class="post-metadata">

**Author:** ![Mhousse1247](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mhousse1247](https://forums.unrealengine.com/u/Mhousse1247)\
**Post date:** [August 4, 2015, 11:39pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/10 "2015-08-04T23:39:29Z")

</div>

[Here](http://goo.gl/wrloDf)

is my test project , take a look at it

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a1d09d07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a1d09d07](https://forums.unrealengine.com/u/anonymous_user_a1d09d07)\
**Post date:** [August 5, 2015, 4:12pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/11 "2015-08-05T16:12:59Z")

</div>

Sorry, your link is invalid, so I can’t try it.

Basically in my construction script I am looping through X times and creating static mesh components. For each one created, I want to see if it overlaps any others created in the loop previously, and if so move it until it doesn’t overlap anymore.

But every check just returns an empty result set, even when overlaps occur.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a1d09d07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a1d09d07](https://forums.unrealengine.com/u/anonymous_user_a1d09d07)\
**Post date:** [August 5, 2015, 4:33pm UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/12 "2015-08-05T16:33:05Z")

</div>

Ok I have been able to get it working in a simple example like you show above, but not in my more complicated setup. So I need to do some more digging to determine if the bug is mine or Unreal’s.

---

<div class="post-metadata">

**Author:** ![Sengchor](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sengchor/32/1214574_2.png) [@Sengchor](https://forums.unrealengine.com/u/Sengchor)\
**Post date:** [November 8, 2023, 4:04am UTC](https://forums.unrealengine.com/t/need-to-access-overlap-data-in-construction-script/327654/13 "2023-11-08T04:04:48Z")

</div>

I got empty array from the overlap component. How can I solve this?
