Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Disable Collision between ropes
#1
Pregunta 
Hi there, in my project I have 3 obi ropes and they share the same rope blueprint. At runtime, these ropes collide with each other. I want to disable those collisions between ropes. I've already tried collision filtering but once I change the category of one control point, it changes on all ropes. Also I saw in some threads, there is a property called "phase", but in my obirope version there is no "SetPhase" method. Is there a simple way to disable collisions between ropes that share same blueprint? Thanks in advance.
Reply
#2
(04-11-2021, 06:42 PM)sagaman Wrote: I've already tried collision filtering but once I change the category of one control point, it changes on all ropes.

That's the expected behavior if all ropes share the same blueprint: if you modify the blueprint, it affects all ropes using it.

(04-11-2021, 06:42 PM)sagaman Wrote: Also I saw in some threads, there is a property called "phase", but in my obirope version there is no "SetPhase" method.

Phase-based collision filtering was an older filtering system, considerably less flexible than the current mask/category system.

(04-11-2021, 06:42 PM)sagaman Wrote: Is there a simple way to disable collisions between ropes that share same blueprint? Thanks in advance.

If all your ropes share the same blueprint and don't want to use different blueprints, you can change their filters at runtime using actor.SetFilterCategory and actor.SetFilterMask. For instance:

Code:
rope.SetFilterCategory(5); // set all particles in the rope to category 5.
rope.SetFilterMask(ObiUtils.CollideWithEverything); // set them to collide with everything.

This sets the filter for the entire actor. Note you can also change filters on a finer, per-particle basis, by writing into the solver.filters array. See:
http://obi.virtualmethodstudio.com/manua...icles.html

kind regards,
Reply