11-07-2024, 10:02 AM
(This post was last modified: 11-07-2024, 10:08 AM by josemendez.)
(11-07-2024, 05:26 AM)GuoliZheng Wrote: How to delete particles by “(pa.actor as ObiEmitter).life[pa.indexInActor] = 0;” in Obi fluid 7.0?
The life array is now part of the solver, like all other data arrays (positions, velocities, etc):
Code:
solver.life[solverIndices[i]] = 0;
I've corrected the manual as there was a leftover code snippet related to this, that is now obsolete.
Note that in Obi 7 you have void zones, which will reduce the particle's lifetime when in contact with them. This solves a common use case (using collision callbacks to kill particles when they reach a specific zone/area) without the need to write any code.
kind regards,