Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi Solver OnCollision
#2
(02-11-2021, 01:34 PM)ProDea Wrote: Hello everyone,

Is there any way to take particle color of collided fluidĀ on OnCollision event?

Yes, exact same way you'd take any other particle property upon collision:

Code:
var color = solver.colors[particleIndex];

Note however, this assumes the color of your fluid comes from particle color only. The final fluid color is calculated as:

Quote:particle renderer color * particle color

So if the color of your fluid comes from emitter or renderer color, you'll have to get which actor (emitter) the particle belongs to, then pick the color up from there. This can also be done, see "Retrieving the actor involved in a contact" in the manual:

http://obi.virtualmethodstudio.com/manua...sions.html
Reply


Messages In This Thread
Obi Solver OnCollision - by ProDea - 02-11-2021, 01:34 PM
RE: Obi Solver OnCollision - by josemendez - 02-11-2021, 01:51 PM
RE: Obi Solver OnCollision - by ProDea - 02-11-2021, 02:35 PM
RE: Obi Solver OnCollision - by josemendez - 02-11-2021, 02:44 PM
RE: Obi Solver OnCollision - by ProDea - 02-11-2021, 03:06 PM