# Instance overlap functions for foliage don't work in UE 5.0 \[reported\]

**URL:** <https://forums.unrealengine.com/t/instance-overlap-functions-for-foliage-dont-work-in-ue-5-0-reported/518664>\
**Category:** Feedback & Requests\
**Tags:** unreal-engine, UE5-0, bug-report, Blueprint\
**Created:** [April 7, 2022, 3:20pm UTC](https://forums.unrealengine.com/t/instance-overlap-functions-for-foliage-dont-work-in-ue-5-0-reported/518664 "2022-04-07T15:20:56Z")\
**Posts on this page:** 5\
**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:** [April 7, 2022, 3:20pm UTC](https://forums.unrealengine.com/t/instance-overlap-functions-for-foliage-dont-work-in-ue-5-0-reported/518664/1 "2022-04-07T15:20:57Z")

</div>

If someone has issues with it, I’ve already reported it with a simple repro project.  
_Case # 00424950: Instance overlap functions don’t work anymore for foliage (regression from UE5 EA)_

Basically, functions like [GetInstancesOverlappingSphere](https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/Components/InstancedStaticMesh/GetInstancesOverlappingSphere/) don’t work when called on Foliage ISM component, but work correctly when called on regular ISM or HISM components.

Edit: Link to the simple repro project: [Box](https://app.box.com/s/pmpjs84wi1xq5cfxklf8lm25ye2yvzva)  
When calling HISM function, it prints the correct amount (14). If calling the Foliage ISM function, it missed many instances, in this case it prints only 3.

---

<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:** [April 21, 2022, 8:13pm UTC](https://forums.unrealengine.com/t/instance-overlap-functions-for-foliage-dont-work-in-ue-5-0-reported/518664/2 "2022-04-21T20:13:27Z")

</div>

Update: You can track the issue here: [Unreal Engine Issues and Bug Tracker (UE-149109)](https://issues.unrealengine.com/issue/UE-149109)

---

<div class="post-metadata">

**Author:** ![Kettenotter](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kettenotter/32/620822_2.png) [@Kettenotter](https://forums.unrealengine.com/u/Kettenotter)\
**Post date:** [June 26, 2022, 2:37pm UTC](https://forums.unrealengine.com/t/instance-overlap-functions-for-foliage-dont-work-in-ue-5-0-reported/518664/3 "2022-06-26T14:37:40Z")

</div>

Someone did find the cause and a temporary fix in this thread:

> [@'Get Instances Overlapping Box/Sphere' not working as expected in UE 5.0](https://forums.unrealengine.com/t/get-instances-overlapping-box-sphere-not-working-as-expected-in-ue-5-0/530779/10):
>
> Ok I fixed it for my specific case. I observed the following… UE5.0 introduced a variable on InstancedFoliage.cpp called bUseTranslatedInstanceSpace - From what I loosely understand, this aims to solve foliage precision in large worlds due to the use of floating points. The logic takes the first instance position and uses that as an origin space for all other foliage to calculate from. The problem I believe is that this value is used when building the foliage tree, but not taken into considera…

---

<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:** [June 26, 2022, 7:49pm UTC](https://forums.unrealengine.com/t/instance-overlap-functions-for-foliage-dont-work-in-ue-5-0-reported/518664/4 "2022-06-26T19:49:24Z")

</div>

Thanks! I’ll check it out 🙂

---

<div class="post-metadata">

**Author:** ![Kettenotter](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kettenotter/32/620822_2.png) [@Kettenotter](https://forums.unrealengine.com/u/Kettenotter)\
**Post date:** [June 27, 2022, 2:07am UTC](https://forums.unrealengine.com/t/instance-overlap-functions-for-foliage-dont-work-in-ue-5-0-reported/518664/5 "2022-06-27T02:07:48Z")

</div>

> [@'Get Instances Overlapping Box/Sphere' not working as expected in UE 5.0](https://forums.unrealengine.com/t/get-instances-overlapping-box-sphere-not-working-as-expected-in-ue-5-0/530779/14):
>
> I pulled the current main branch and was delighted to see that the bug was gone. (In my testings) I will just have to ignore the newly added graphic glitches. smile [UnrealEditor\_28]
