Best way to remove particles at runtime - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Best way to remove particles at runtime (/thread-2637.html) |
Best way to remove particles at runtime - ary1111 - 16-12-2020 So I'm trying to have particles disappear when they collide with an object. I have tried three methods but all seem to cause the emitter to behave weird. When the particles collide with the object they do disappear but it seems like at a certain point (30 seconds in), particles just disappear as soon they emitted when I use either one of these methods. Code: private void Solver_OnCollision(ObiSolver s, ObiSolver.ObiCollisionEventArgs e) Is there a standard way for removing specific particles when a collision takes place? RE: Best way to remove particles at runtime - josemendez - 16-12-2020 The indices provided by contacts are solver indices. You need to convert them to actor indices first, as per the docs: http://obi.virtualmethodstudio.com/tutorials/scriptingcollisions.html Quote:IndexInActor RE: Best way to remove particles at runtime - ary1111 - 16-12-2020 I see, thanks for the quick response and explanation! I am able to properly kill the particles now. |