I am working on an android application which is based on the game engine--libgdx.
Box2d is used as the physical engine in it.
In my program, I create some bodies,and give some force on them.I hope to destroy the bodies which come into a collision,
so I add a contact listener in the render function, and destroy bodies which crash with each other in the listener.But here come a bug ,that is I can't destroy bodies . So where should I destroy it and when?
Box2d is used as the physical engine in it.
In my program, I create some bodies,and give some force on them.I hope to destroy the bodies which come into a collision,
so I add a contact listener in the render function, and destroy bodies which crash with each other in the listener.But here come a bug ,that is I can't destroy bodies . So where should I destroy it and when?