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 -
Made a brand new Third Person Template Project in UE5.
Created a new blueprint actor and added an “InstancedStaticMesh” component to it.
Set the Static Mesh property of “InstancedStaticMesh” to “SM_Ramp”.
Added 3 instances of this ISM component.
Set the collision presets to “Overlap Only Pawn”
Made sure Generate Overlap Events is set to “true”
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.