box2d-jquery
box2d-jquery copied to clipboard
remove box2d element
Hey, this is great, thanks for putting it together.
Is there an easy way to remove box2d from an element on the page after it has been added? I'm wanting to remove an image from the page at a certain point so the user can't interact with it anymore, but when i do $('#element').remove() it does remove the image, but I can still move the invisible placeholder that is there and it still collides with other elements on the page.
Thanks!
or it would be nice to be able to just disable the ability to move the element, that would work too.
currently there is no simple way to edit/remove a box2d body after was created
but there definitely should be, will add it soon
Is there a way to just remove the effects?
+1 for this feature
+1.
+1
i'm currently in the phase of hiring somebody to revive this project again, we will see how it works out.
Hey guys,
the current develop
branch contains functionality that lets you remove a body from box2d as you remove an element from the DOM.
So now $('#element').remove()
also removes from the box2d world, feel free to check out the example in examples/remove-elements.html