hapticdata/toxiclibsjs

Can't make removeBehavior to work

Dazzid opened this issue · 2 comments

Hi
I'm trying to removeBehavior of a particle but don't find the way to call the function properly.
physics.removeBehavior(this.AttractionBehavior());

How can I find this Attractor?
Thanks for the help
David

Oh my fault I have found my mistake. After doing this:
var myAttraction = new AttractionBehavior(this, range, strength, 0.0001);
physics.addBehavior(myAttraction);
and then
physics.removeBehavior(myAttraction);

glad you figured it out! thanks for reporting back