# Instanced static mesh - sweep result hit item result returning "-1" in UE 5.3

**URL:** <https://forums.unrealengine.com/t/instanced-static-mesh-sweep-result-hit-item-result-returning-1-in-ue-5-3/1309203>\
**Category:** Issues and Bug Reporting\
**Tags:** instance, overlap, overlap-actors, unreal-engine, Instanced-Mesh, bug-report, staticmesh, question, overlap-event\
**Created:** [September 23, 2023, 3:18pm UTC](https://forums.unrealengine.com/t/instanced-static-mesh-sweep-result-hit-item-result-returning-1-in-ue-5-3/1309203 "2023-09-23T15:18:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SHOBBIT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SHOBBIT](https://forums.unrealengine.com/u/SHOBBIT)\
**Post date:** [September 23, 2023, 3:18pm UTC](https://forums.unrealengine.com/t/instanced-static-mesh-sweep-result-hit-item-result-returning-1-in-ue-5-3/1309203/1 "2023-09-23T15:18:43Z")

</div>

**Hello everyone**

I think I have encountered a bug in Unreal Engine 5.3 where the ISM Sweep Result Hit Item is returning “-1” instead of the instance index that it is expected to return (Cuz in previous engine versions it used to do this). Or am I missing something fundamental?

To confirm this I did the following steps -

1. Made a brand new Third Person Template Project in UE5.
2. Created a new blueprint actor and added an “InstancedStaticMesh” component to it.
3. Set the Static Mesh property of “InstancedStaticMesh” to “SM\_Ramp”.
4. Added 3 instances of this ISM component.
5. Set the collision presets to “Overlap Only Pawn”
6. Made sure Generate Overlap Events is set to “true”
7. Clicked on “On Component Begin Overlap” Event
8. Added the following blueprint script  
 ![ISM_Script](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/f/b/4fb035c3b7e05d741ba0f65cf355c3928e029476.png)
9. Started playing-in-editor and when I made my character run-through the ISM instances, getting the “-1” print string output.  
 ![ISM_MinusOne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/b/9cbca61049eefb50c4753005a32db422e59d7db7.jpeg)

So, is anyone else facing this issue? Or does anyone know some kind of workaround for this?

I am using ISM in my own project to create efficient pick-ups.

---

<div class="post-metadata">

**Author:** ![SireRagnarok](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SireRagnarok](https://forums.unrealengine.com/u/SireRagnarok)\
**Post date:** [January 19, 2024, 6:27pm UTC](https://forums.unrealengine.com/t/instanced-static-mesh-sweep-result-hit-item-result-returning-1-in-ue-5-3/1309203/2 "2024-01-19T18:27:16Z")

</div>

I seem to be having this problem as well.

---

<div class="post-metadata">

**Author:** ![SireRagnarok](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SireRagnarok](https://forums.unrealengine.com/u/SireRagnarok)\
**Post date:** [January 19, 2024, 6:44pm UTC](https://forums.unrealengine.com/t/instanced-static-mesh-sweep-result-hit-item-result-returning-1-in-ue-5-3/1309203/3 "2024-01-19T18:44:01Z")

</div>

After encountering two other posts (linked below), I have found a work around with approaching things from the other side. I.e., instead of having the instanced static mesh detect the index and remove itself, I have the overlapping actor detect the index and tell the ISM to remove it. Apparently, the overlapped actor gets the correct index, just the ISM itself does not. This seems silly to me, but I don’t know what else to do.

> [@Get overlapping index of Hierarchical instanced static mesh](https://forums.unrealengine.com/t/get-overlapping-index-of-hierarchical-instanced-static-mesh/461890/7):
>
> for anyone might have same mistake like me, the overlap event should be in another component, not in instance component. well it was obvious one but just in the case there are someone like me haha.

> [@Get index of collided instanced static mesh](https://forums.unrealengine.com/t/get-index-of-collided-instanced-static-mesh/466536/11):
>
> The problem is that my wall should decide what to do with a brick which was hit by a gun projectile. But it’s like I said, the projectile knows the correct index What exactly is stopping you from propagating the data from the projectile to the wall actor?

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [February 19, 2024, 9:34pm UTC](https://forums.unrealengine.com/t/instanced-static-mesh-sweep-result-hit-item-result-returning-1-in-ue-5-3/1309203/5 "2024-02-19T21:34:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
