I’m currently working on my first ever mobile game in unreal and have stumbled on a little road block. Does anyone know if it’s possible to change a specific instanced static meshes material when it is overlapped by a ball, without changing the material of other instanced static meshes?
Is this not working for you? Also, the dirty flag should be set for the last instance only. Using it like this almost defeats the purpose. And that should be Instance Count - 1.
Nah. Your research is spot on. It’s a good method, performant but somewhat tricky to set up right.
I’ve found the answer in another forum post:
It’s hard to tell (for me) what would be more efficient - a multibody overlap or a physical hit. I’d say the latter would be faster but it might as well be in the ballpark of negligible difference. Things can be further optimised, too.
When it comes to HISM vs ISM - which one to choose would depend on how the levels are designed and the design of the tiles. HISMs come with their own indexing baggage which can make it cumbersome. But if your tiles are complex, there is a A LOT of them, and we do not need to see all of them all the time, HISMs will be worth it.
Obviously, if you do not want / need physics or want to use an overlapping volume to do more funky stuff, multibody is the way to go. Good luck with the rest!
If I add an instance to InstancedStaticMeshComponent with AddInstance(), is it possible to switch the physics on or off from each instance or can only the color be changed?
I’m personally not too sure unfortunately. You may have to create a new thread for this question. So far physics doesn’t seem to be a feature you can manipulate for instanced static meshes. I could be wrong though.