Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope pin+collision problem.
#6
(23-06-2022, 07:10 AM)josemendez Wrote: Hi!

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).
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.

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;
One more question: when particles are added to the rope with the ChangeLength what control point do they use set their values (i.e filter, mass)?
Reply


Messages In This Thread
Rope pin+collision problem. - by WinterXYZ - 01-08-2021, 02:42 PM
RE: Rope pin+collision problem. - by josemendez - 02-08-2021, 07:46 AM
RE: Rope pin+collision problem. - by WinterXYZ - 06-08-2021, 05:38 PM
RE: Rope pin+collision problem. - by Destro26 - 22-06-2022, 09:55 PM
RE: Rope pin+collision problem. - by josemendez - 23-06-2022, 07:10 AM
RE: Rope pin+collision problem. - by Destro26 - 23-06-2022, 09:13 PM
RE: Rope pin+collision problem. - by josemendez - 24-06-2022, 07:09 AM