Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Collision filtering for ropes
#3
(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?
Reply


Messages In This Thread
Collision filtering for ropes - by linkinb - 10-10-2021, 07:24 AM
RE: Collision filtering for ropes - by josemendez - 10-10-2021, 11:06 AM
RE: Collision filtering for ropes - by linkinb - 10-10-2021, 12:12 PM
RE: Collision filtering for ropes - by josemendez - 11-10-2021, 08:57 AM
RE: Collision filtering for ropes - by linkinb - 11-10-2021, 02:23 PM