How do I know what instance (or its index) of an ISMC/HISMC is involved in an overlap or collision?
I want to use instanced meshes for modular level geometry that gets re-used throughout the levels (like a standard wall segment etc). Of course, I have to be able to tell wich segment was hit in the event of a collision. Can ISMCs somehow provide this information or would I have to use seperate actors for the collision part without rendering and disable collisions in the ISMC? That would be less than convenient…
So, do I really need to create additional actors for the collision part in order to identify what instance of an instanced static mesh is being hit/overlapped??
I would feel kinda stupid starting work on this and later find out there’s a setting that provides the instance ID in the hit-structure or something after all.
It’s been over a year and I’m back to working on this problem, so I’m gonna bump this one…
I figured by now that the “Item”-property of a HitResult provides the instance ID for an ISM-component in raytraces. My guess is that overlap-testing will also provide a valid Item-ID (though I haven’t actually tested it yet).
However, testing with simulation-driven collision events has only yielded Item-IDs of -1 so far… Is there any way to make it work?
I would find it strange, if I had to write an OnHit function that does nothing but do a raytrace/overlap-test at the location of a hit in order to figure out (basically guess…) what instance got hit in the event.