This is a problem I have been wanting to solve for a while, although I can never find a way to fix it. I think I may be missing something, but I can't seem to find what.
I'm trying to destroy bodies from the b2World, I've seen on various tutorials that when they destroy an object in box2d with debug draw on, the shape gets destroyed too. For some reason when I do:
world.DestroyBody(_body) it doesn't seem to do anything. The shape stays on the screen.
Has anybody had this problem before? It makes me worry because after a while with playing the game, all the objects which I want to destroy remain on the screen and still register collisions which really lag up the game.
Any help would be much appreciated,
Thanks,
Will
EDIT: [RESOLVED] Thanks guys, that makes perfect sense.