Obi Official Forum
Help Disable Collision between ropes - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Help Disable Collision between ropes (/thread-3165.html)



Disable Collision between ropes - sagaman - 04-11-2021

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.


RE: Disable Collision between ropes - josemendez - 04-11-2021

(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/manual/6.2/scriptingparticles.html

kind regards,