14-07-2021, 09:39 AM
(This post was last modified: 14-07-2021, 09:42 AM by josemendez.)
You can count how many contacts reference a specific collider yourself. Simply check the collider referenced by each contact and if it's the one you're interested in, increase a counter. This is what is done in the FluidMaze sample scene to determine if the fluid is in contact with specific dye blocks.
See "Retrieving the collider involved in a contact" in the manual's scripting section:
http://obi.virtualmethodstudio.com/manua...sions.html
You can also take a look at the sample script you'll find at the very end of that page. It checks if fluid is in contact with a specific trigger collider (by comparing its tag), and if so, accelerate particles in a direction opposite to gravity (effectively creating a zero-G zone).
See "Retrieving the collider involved in a contact" in the manual's scripting section:
http://obi.virtualmethodstudio.com/manua...sions.html
You can also take a look at the sample script you'll find at the very end of that page. It checks if fluid is in contact with a specific trigger collider (by comparing its tag), and if so, accelerate particles in a direction opposite to gravity (effectively creating a zero-G zone).