Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Version update help
#9
(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,
Reply


Messages In This Thread
Version update help - by GuoliZheng - 10-07-2024, 09:41 AM
RE: Version update help - by josemendez - 10-07-2024, 09:48 AM
RE: Version update help - by josemendez - 10-07-2024, 01:21 PM
RE: Version update help - by GuoliZheng - 10-07-2024, 01:36 PM
RE: Version update help - by GuoliZheng - 10-07-2024, 04:16 PM
RE: Version update help - by josemendez - 10-07-2024, 04:51 PM
RE: Version update help - by GuoliZheng - 11-07-2024, 03:56 AM
RE: Version update help - by GuoliZheng - 11-07-2024, 05:26 AM
RE: Version update help - by josemendez - 11-07-2024, 10:02 AM
RE: Version update help - by josemendez - 11-07-2024, 10:06 AM