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

Support removal of bodies and components #14

Closed
wyattanderson opened this issue Dec 4, 2013 · 1 comment
Closed

Support removal of bodies and components #14

wyattanderson opened this issue Dec 4, 2013 · 1 comment
Labels

Comments

@wyattanderson
Copy link

Please forgive me if there's an obvious reason why I shouldn't be doing this, but I'd like to remove things from my simulation periodically beyond just particles. For instance, if I create a body that has associated edges, particles and constraints, I'd like to be able to remove the entire thing from the simulation at a certain point.

I was able to accomplish this for my purposes by adding an isDestroyed to Edge and adding a cull pass into the simulator for the edge list. I can submit a PR with that change if that's valuable.

In general, I'd just like to start a discussion as to the right approach for removal of complex bodies from the simulator.

@hunterloftis
Copy link
Owner

Hi! And definitely, this should be a feature. I would like to in general revisit the destruction/culling of all types - removal needs to be fast but also as automated as possible (without thrashing the GC or leaking memory).

What are your thoughts?

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

No branches or pull requests

2 participants