23-06-2022, 09:13 PM
(23-06-2022, 07:10 AM)josemendez Wrote: Hi!Thank you, I was able to get it working by using solver.filters. I am creating the rope at runtime so i'm not able to set up filters in the editor.
You can change the filter for a specific particle, just like you can change any other particle property like position, velocity, mass, etc. Just write into the solver.filters array, see:
http://obi.virtualmethodstudio.com/manua...icles.html
This is usually not necessary since you can simply add more control points to your path and set the filters up in editor (initial filter values for each particle are picked from the closest control point along the rope).
For anyone who needs it, this code turned off the collision of the first particle in the rope
Code:
int filterNoCollision = ObiUtils.MakeFilter(ObiUtils.CollideWithNothing, 0);
rope.solver.filters[rope.elements[0].particle1] = filterNoCollision;