# 'Get Instances Overlapping Box' doesn't work

**URL:** <https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260>\
**Category:** Community & Industry Discussion\
**Tags:** overlapping, bug, box, unreal-engine, component, instances, question\
**Created:** [August 5, 2016, 6:24pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260 "2016-08-05T18:24:37Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [August 5, 2016, 6:24pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/1 "2016-08-05T18:24:37Z")

</div>

[Get Instances Overlapping Box](https://docs.unrealengine.com/latest/INT/BlueprintAPI/Components/InstancedStaticMesh/GetInstancesOverlappingBox/index.html) doesn’t return any instances, even if it’s set to really big box, like Min = (-100k, -100k, -100k) Max = (100k, 100k, 100k).

I’ve tested it with hierarchical instanced static meshes (foliage component).  
‘Get Instances Overlapping Sphere’ works fine in the same conditions (it detects the instances), so it must be a bug.

( How to get foliage component in game: _Get All Actors of Class (InstancedFoliageActor) → ForEach → getComponentsByClass(Foliage Instanced Static Mesh Component)_ )

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [August 6, 2016, 5:44pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/2 "2016-08-06T17:44:48Z")

</div>

Looks like Overlapping Sphere node also has problems, it misses many instances: [https://answers.unrealengine.com/questions/368462/instancedstaticmesh-overlapping-sphere-misses-inst.html](https://answers.unrealengine.com/questions/368462/instancedstaticmesh-overlapping-sphere-misses-inst.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [August 8, 2016, 7:47pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/3 "2016-08-08T19:47:24Z")

</div>

Hi ,

- Does this occur in a clean, blank project with no additional content or is it limited to one project?
- What steps can I take to reproduce this on my end?
- Is this limited to foliage actors or does it occur on instanced meshes/hierarchical instance meshes as well?
- Can you show me a screenshot of how you are setting this up for use?

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [August 8, 2016, 8:11pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/4 "2016-08-08T20:11:35Z")

</div>

Sure, I’ve made a repro demo project here:

[Box Overlap Bug Repro Demo Project](https://www.dropbox.com/s/sermlue5qxn827d/BoxOverlapBug.?dl=0)

Just press play to see the bugged logic. The ‘OverlapTester’ blueprint does it, it’s in the main folder.

… + regarding Sphere Overlap, it seems like it’s bugged on 4.12 but fixed on 4.13. I’ve made two projects, one for 4.12 which presents bugged sphere overlap (not all instances are detected & removed) and one for 4.13 which presents properly working sphere overlap (all instances detected & removed)

[4.12 Sphere Overlap - bugged](https://www.dropbox.com/s/sbejgwhbuv3fiea/SphereOverlap_Bugged_4.12.?dl=0)

[4.13 Sphere Overlap - fixed](https://www.dropbox.com/s/lvv0drrjk3k0w98/SphereOverlap_Working_4.13.?dl=0)

For all projects, just press Play to see the bugged logic in action.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [August 9, 2016, 2:03pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/5 "2016-08-09T14:03:04Z")

</div>

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it [here](https://issues.unrealengine.com/issue/UE-34409). You can track the report’s status as the issue is reviewed by our development staff.

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [August 9, 2016, 5:28pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/6 "2016-08-09T17:28:38Z")

</div>

Thanks. I see that the bug is marked as ‘Duplicate’, is this correct?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [August 9, 2016, 7:47pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/7 "2016-08-09T19:47:59Z")

</div>

Hi ,

There was a bit of miscommunication on the backend of this one. I’ve gotten it sorted out and it is back to unresolved. Please keep an eye on it for the reports future updates. Thanks!

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [September 1, 2016, 6:12pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/8 "2016-09-01T18:12:50Z")

</div>

Hello,

In release notes of 4.13 I see that

> Updated “Remove Instances” on a  
> Hierarchical Instanced Static Mesh  
> Component to now properly rebuild the  
> cluster tree, allowing “Get Instances  
> Overlapping Box” to return correct  
> results.

But the issue is still marked as _Backlogged_, sadly… But is it correct? Is the ‘Get Instances Overlapping Box’ really fixed?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [September 1, 2016, 8:00pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/9 "2016-09-01T20:00:36Z")

</div>

Hi ,

I tested this to be sure. The backlog is correct, the box overlap is not yet fixed. Once a fix has been implemented, the public bug tracker will update to reflect this.

---

<div class="post-metadata">

**Author:** ![JackP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JackP](https://forums.unrealengine.com/u/JackP)\
**Post date:** [January 10, 2017, 7:27am UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/10 "2017-01-10T07:27:34Z")

</div>

Hi, this has just been fixed for 4.15. If you’re using the source code, the change is available on github here:

[https://github.com/EpicGames/UnrealEngine/commit/29fca7a767f61025bcd8ad0f3f346c68ba6af6b0](https://github.com/EpicGames/UnrealEngine/commit/29fca7a767f61025bcd8ad0f3f346c68ba6af6b0)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_051a8637](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_051a8637](https://forums.unrealengine.com/u/anonymous_user_051a8637)\
**Post date:** [October 24, 2017, 6:26pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/11 "2017-10-24T18:26:58Z")

</div>

this problem still exists in 4.17.2. At least in my project

---

<div class="post-metadata">

**Author:** ![Ryokath](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryokath](https://forums.unrealengine.com/u/Ryokath)\
**Post date:** [January 15, 2018, 7:59pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-box-doesnt-work/366260/12 "2018-01-15T19:59:04Z")

</div>

I can confirm that the problem is still occuring with 4.18.2 with Get Instance Overlaping Sphere.
