hecht-software / box2dweb

Automatically exported from code.google.com/p/box2dweb
308 stars 94 forks source link

b2DestructionListener not called when body is destroyed #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
b2DestructionListener.SayGoodbyeFixture method is not called when parent body 
is destroyed with
world.DestroyBody method.

Original issue reported on code.google.com by kristjan...@gmail.com on 21 Dec 2010 at 2:55

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for reporting. I have less time at the moment, so it'll take a while 
until I'm able to fix this and issue #10.

Original comment by Uli.He...@googlemail.com on 24 Dec 2010 at 2:33

GoogleCodeExporter commented 8 years ago
In your example, you forgot to:
world.SetDestructionListener(new b2DestructionListener);

If you add this line, everything seems to work as expected.

Nevertheless, this is the wrong way to implement the b2DestructionListener 
(although it works). I'll write a wiki entry about that.

Original comment by Uli.He...@googlemail.com on 9 Jan 2011 at 12:13