# "Get instances overlapping sphere" Instanced static meshes found issue

**URL:** <https://forums.unrealengine.com/t/get-instances-overlapping-sphere-instanced-static-meshes-found-issue/391220>\
**Category:** Asset Creation\
**Tags:** unreal-engine, Instanced-Mesh, bug-report, question, Blueprint\
**Created:** [April 18, 2017, 1:22pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-sphere-instanced-static-meshes-found-issue/391220 "2017-04-18T13:22:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![formatt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@formatt](https://forums.unrealengine.com/u/formatt)\
**Post date:** [April 18, 2017, 1:22pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-sphere-instanced-static-meshes-found-issue/391220/1 "2017-04-18T13:22:32Z")

</div>

I have seen a few people having strange results when using this blueprint feature but I haven’t seen a solution. My current project makes use of this a lot and with certain meshes the results seem to be different to what I am expecting.

I decided to create a new project to test this out so hopefully someone from Epic can have a look for me, I can upload this project if you need it.

Here are a couple of screenshots of the issue…

 ![134659-notoverlapping.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/9/8290ea38ddba340de279ef8054b6744333b53ab5.jpeg)

The cube is a blueprint actor with an instanced static mesh component which is drawing one cube instance. The white sphere has a repeating delay of 1 second which calls “Get instances overlapping sphere” using its world location and prints the results of how many instances it is overlapping. In this case 0 which is what I would expect.

 ![134660-overlapping.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/a/e/8ae028c90d41fe7693694bb591669edc8e235bfe.jpeg)

In this second picture I have moved the white sphere closer while simulating in editor and it starts returning a result of 1 when it is still quite far away from the cube instance. I have tried this with using a radius of 0, 0.1, 1 etc and it still always returns a positive overlap even when it is not touching the cube instance. This is when using the Cube mesh from /Engine/EngineMeshes/Cube.

As I said before, it seems to act different for different meshes. Using the cube from /Engine/BasicShapes I get this result…

 ![134681-smallmeshnotoverlap.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/7/4e743b80970874b9718c337b75b289453aa8139f.jpeg)

 ![134682-smallmeshoverlap.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/6/e/16e55b8634d739af15b730b1810e23419795c345.jpeg)

When using a shape that isn’t as regular as a cube I get even less consistent results it seems…

 ![134683-fencenotoverlapping.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/9/b395a4361fdf31a663336067648099aa0007883c.jpeg)

All objects are using a scale of 1 and it doesn’t seem to matter what type of collision they have.

Please let me know if I am doing something wrong or if this could be a bug?

Thank you!

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [April 25, 2017, 5:34pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-sphere-instanced-static-meshes-found-issue/391220/2 "2017-04-25T17:34:50Z")

</div>

Hi formatt,

Sorry for the delay. I plan to look into this asap. Could you upload the test project you mentioned?

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [May 1, 2017, 12:14pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-sphere-instanced-static-meshes-found-issue/391220/3 "2017-05-01T12:14:24Z")

</div>

We haven’t heard back from you in a few days, so we are marking this post as resolved for tracking purposes. If you’re still experiencing this issue, please upload the project you mentioned and comment to reopen the post.

Cheers,

TJ

---

<div class="post-metadata">

**Author:** ![formatt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@formatt](https://forums.unrealengine.com/u/formatt)\
**Post date:** [May 3, 2017, 11:01am UTC](https://forums.unrealengine.com/t/get-instances-overlapping-sphere-instanced-static-meshes-found-issue/391220/4 "2017-05-03T11:01:35Z")

</div>

Sorry I didn’t see a message from you guys, my bad.

Project should be attached. If you simulate, then drag the sphere near the cube it should show you what I mean. If you change the static mesh in the static mesh instance blueprint you should see some different behaviours depending on the mesh.

Thanks a lot.

link text

---

<div class="post-metadata">

**Author:** ![Phelioz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phelioz](https://forums.unrealengine.com/u/Phelioz)\
**Post date:** [May 6, 2017, 10:10am UTC](https://forums.unrealengine.com/t/get-instances-overlapping-sphere-instanced-static-meshes-found-issue/391220/5 "2017-05-06T10:10:36Z")

</div>

Having similar problems with the GetInstancesOverlappingSphere method but using the C++ version in UHierarchicalInstancedStaticMeshComponent. GetInstancesOverlappingBox had similar problems before 4.15 but was fixed [https://github.com/EpicGames/UnrealEngine/commit/29fca7a767f61025bcd8ad0f3f346c68ba6af6b0](https://github.com/EpicGames/UnrealEngine/commit/29fca7a767f61025bcd8ad0f3f346c68ba6af6b0)

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [May 17, 2017, 6:39pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-sphere-instanced-static-meshes-found-issue/391220/6 "2017-05-17T18:39:19Z")

</div>

Hi formatt,

I was able to reproduce this with the project you include. Thank you for uploading it by the way.

I believe this to be a bug, so I created [JIRA UE-45142](https://issues.unrealengine.com/issue/UE-45142) and our developers will be investigating further. Follow that link to monitor the status of the report.

As for the fix Phelioz mentioned, I believe it fixed some core scaling functionality but not the issue you are seeing. What you are seeing is still occurring in 4.15 and later builds.

Cheers,

TJ

---

<div class="post-metadata">

**Author:** ![formatt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@formatt](https://forums.unrealengine.com/u/formatt)\
**Post date:** [July 13, 2017, 6:15am UTC](https://forums.unrealengine.com/t/get-instances-overlapping-sphere-instanced-static-meshes-found-issue/391220/7 "2017-07-13T06:15:15Z")

</div>

Hey. Thanks for that.

I have been keeping an eye on the bug report and it says “By Design” as the status. Can you explain what that means? Is it supposed to work like that and there will be no fix?

---

<div class="post-metadata">

**Author:** ![TJ\_V](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tj_v/32/1008648_2.png) [@TJ\_V](https://forums.unrealengine.com/u/TJ_V)\
**Post date:** [July 13, 2017, 12:45pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-sphere-instanced-static-meshes-found-issue/391220/8 "2017-07-13T12:45:43Z")

</div>

Hi formatt,

Here is the note the dev provided on the internal JIRA.

> The functionality of  
> GetInstancesOverlappingSpheres  
> operates on the instance mesh **bounds**.  
> If you rotate the fence you can see  
> that the overlap happens once the  
> bounds of the sphere overlap with the  
> bounds of the mesh. This is reflected  
> by the tooltip above the blueprint  
> node.

We are considering renaming the node to make that more clear. Sorry for any confusing this caused.

---

<div class="post-metadata">

**Author:** ![Piranhi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/piranhi/32/890994_2.png) [@Piranhi](https://forums.unrealengine.com/u/Piranhi)\
**Post date:** [April 23, 2018, 7:29pm UTC](https://forums.unrealengine.com/t/get-instances-overlapping-sphere-instanced-static-meshes-found-issue/391220/9 "2018-04-23T19:29:41Z")

</div>

Hey,

Can we get something added that doesn’t rely on the bounds to find the instanced mesh?
