14-03-2022, 03:28 PM
(This post was last modified: 14-03-2022, 03:29 PM by josemendez.)
Hi there!
You want to use collision callbacks:
http://obi.virtualmethodstudio.com/manua...sions.html
Then, just set the lifetime of the particles in contact with your collider to zero. Like this:
The manual includes sample code snippets to iterate trough all contacts and determine particles in contact with a given collider, as well as killing a certain particle in a emitter - like above.
let me know if you need further help, kind regards
You want to use collision callbacks:
http://obi.virtualmethodstudio.com/manua...sions.html
Then, just set the lifetime of the particles in contact with your collider to zero. Like this:
Code:
int particleIndex = solver.simplices[contact.bodyA];
ObiSolver.ParticleInActor pa = solver.particleToActor[particleIndex];
(pa.actor as ObiEmitter).life[pa.indexInActor] = 0;
The manual includes sample code snippets to iterate trough all contacts and determine particles in contact with a given collider, as well as killing a certain particle in a emitter - like above.
let me know if you need further help, kind regards