javascript - PhysicsJs - how to remove a world behavior, "constant-acceration' after it has been added -


my behaviors on initialization added follows:

world.add([     physics.behavior('interactive', { el: renderer.el }),      physics.behavior('constant-acceleration'),     physics.behavior('body-impulse-response'),     physics.behavior('sweep-prune'),     edgebounce ]); 

i'd to, @ later time, remove "constant-acceleration" behavior. read couple of posts said use remove() method i'm not getting happen using follows:

world.remove( physics.behavior('constant-acceleration') ); 

can advise how achieve removing specific behavior world after has been added?

the physics.behavior docs indicate behavior object returned when call physics.behavior (because constructs new one). need keep reference behavior object you'd call you've put world.add array, pass reference world.remove later. now, you're making new behavior (separate 1 made first) , passing brand new object world.remove, nothing.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -