02-11-2021, 01:51 PM
(This post was last modified: 02-11-2021, 01:52 PM by josemendez.)
(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