10-10-2021, 12:12 PM
(10-10-2021, 11:06 AM)josemendez Wrote: Like most things in Obi, filters are a per-particle property. The scripting section of the manual explains how to get/set per particle properties, and the filter is listed among them:
http://obi.virtualmethodstudio.com/manua...icles.html
For example, to set the filter for all particles in a rope you'd do:
Code:var myFilter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0);
for (int i = 0; i < rope.solverIndices.Length; ++i)
rope.solver.filters[rope.solverIndices[i]].filter = myFilter;
what if I want my rope to collide with 1 type of collider, but not another type of collider, how would I set that up?
for example say i have a sphere and a cube. I want my rope to collide with the sphere but not with the cube, how would that set up look like via code?
Like how can i change the "Collides with" property that you see in the inspector on all obi colliders?