This project has moved and is read-only. For the latest updates, please go here.

Breakable Body Disposal

Aug 30, 2011 at 7:27 PM


I cannot figure out to remove the pieces of a breakable body that is broken.  

The bodies are created and work as expected and break apart upon collision, however when I call:


I only get errors after a few calls but no bodies are removed.


I use:                     BreakableBody breakableBody = new BreakableBody(vertList, world, 10);  to create.

I have tried iterating the fixture parts and just disposing the MainBody, but I can't figure out what I am doing wrong.

Any suggestions are greatly appreciated.



Aug 31, 2011 at 12:45 PM
Edited Aug 31, 2011 at 12:46 PM

Which body? The thing the breaksnle body is that when its broken it spawns the broken parts as new bodies that have the shape of the pieces so yo must prob catch the body adding event and to add logic there.

Of course I might wrong but if you look threw the fixturelidt its empty or something.

Sep 1, 2011 at 3:30 AM

The question is how do I Dispose of the new body/fixture parts?  

Sep 3, 2011 at 12:21 PM
Ok I will try making up an example for you this weekend when I have the time (cause I kinda need that on my project as well hehe) .