Can't make removeBehavior to work
Dazzid opened this issue · 2 comments
Dazzid commented
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
Dazzid commented
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);
hapticdata commented
glad you figured it out! thanks for reporting back