Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Deleting particles when in contact with certain objects
#2
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:

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
Reply


Messages In This Thread
RE: Deleting particles when in contact with certain objects - by josemendez - 14-03-2022, 03:28 PM