Hello everyone
So during my free time Im creating a browser bomberman game and currently I am trying to implement explosion logic and looks. This is how it looks in the game:
I am using a particle system with custom sprites to create a fire effect. [fire playground example]: https://www.babylonjs-playground.com/#1WUQ1S#72
I am also simultaniously using planes (red stripes amid fire in the vid), which I use to detect intersections with players, walls, blocks. [planes playground example]: https://playground.babylonjs.com/#Q9VZS9#277
But this implementation seems so clumsy, so I am wondering if there is an efficient and optimised way to detect intersetions with particles of the Particle System in Babylon? As far as I am awared if I want to detect intersections with particles I should use SPS, but wouldn’t it be an overkill? And wouldn’t it be inefficient in gentral to try and detect particles for intersections, cuz you know, there are so many of them
Or maybe there is a better approach in general, that I am not awared of? May be it would be better to use vertex shaders on the mesh for explosion expansion and fragment shaders for the looks?
Sorry for such a long question, I would appreciate any thoughts and ideas on this topic
P.s. in the fire playground example I also decrease the lifetime of PS and particles to simulate the situation where the fire hits the wall for example and cannot travel further. But this kind of approach seems clumsy as well. Is there a better way to do such a trick?