Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Collision filtering for ropes
#2
(10-10-2021, 07:24 AM)linkinb Wrote: I see that in examples I can access a filter property, and that is being changed by int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0), But i can't find any documentation or tooltips on how to use this to set up collision filtering via script. 

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;
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