Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove box2d element #5

Open
russellrain opened this issue Dec 13, 2012 · 8 comments
Open

remove box2d element #5

russellrain opened this issue Dec 13, 2012 · 8 comments

Comments

@russellrain
Copy link

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!

@russellrain
Copy link
Author

or it would be nice to be able to just disable the ability to move the element, that would work too.

@franzenzenhofer
Copy link
Owner

currently there is no simple way to edit/remove a box2d body after was created

but there definitely should be, will add it soon

@heaversm
Copy link

Is there a way to just remove the effects?

@alchemyasia
Copy link

+1 for this feature

@liuyanghejerry
Copy link

+1.

@oakbarrel
Copy link

+1

@franzenzenhofer
Copy link
Owner

i'm currently in the phase of hiring somebody to revive this project again, we will see how it works out.

@pa7
Copy link
Collaborator

pa7 commented Oct 29, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants