Hello. Is it possible for emiter object’s particles to detect collision? Like when one of the emitter’s particle hits or COLIDE to an object, that object will be removed or a function will be executed. Respectfully I ask, thank you very much
I asked this type of question several years ago, and the conclusion was “unachievable”.
Although you can indeed set up collision listeners for particles, this will seriously affect the performance of your device. In addition, since you need to make the collision particles disappear, if you remove the particle listeners at this time, it will easily generate false alarms. Interrupt your app. This does not necessarily happen but “often” because the moment you remove the listener there is a high chance of contacting another particle.
Then I thought of two solutions
- You can change to “image” and manually make it have similar particle effects, and set independent collisions for each image.
- Set the coordinates, you can move your object through a custom formula, and calculate the path it travels, and then disappear the object on the path.
(The second is the way I usually use)
Thank you very much. But I’m thinking that if the emitter particles supports physical collisions, this could be very useful for making a firing bullets games. It will be easy to rotate the firing direction.
I mean, there is no problem when the bullet is a plain circle. But when the player fires upward with rectangular bullet, the bullet will travel in horizontal position.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.