27-11-2020, 03:38 PM
(This post was last modified: 27-11-2020, 03:41 PM by josemendez.)
(27-11-2020, 03:31 PM)JoseCarlosĀ S Wrote: Nice! It works! If i change the script to be for the emitter instead of the solver, can i get this interaction with one fluid but not the other? Right now it dies when touching any fluid, and i whant it killing itself when touching certain fluids/emitters
You can't just add this script to a emitter, programming doesn't work that way :/.
You should check if the particle belongs to a certain emitter, depending on the result you decide if you destroy the collider or not. To retrieve the emitter a particle belongs to, you can do:
Code:
ObiSolver.ParticleInActor pa = solver.particleToActor[contact.particle];
ObiEmitter emitter = pa.actor as ObiEmitter;
See "Retrieving the actor involved in a contact": http://obi.virtualmethodstudio.com/tutor...sions.html