Fairen / box2dweb

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

b2BuoyancyController #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
var bcd = new b2BuoyancyController
bc = world.CreateController(bcd)

These lines throw "Controller can only be a member of one world". Commenting 
out line 6904 solves the problem.

Original issue reported on code.google.com by kristjan...@gmail.com on 24 Dec 2010 at 10:48

GoogleCodeExporter commented 9 years ago
Please use AddController instead. This seems to be a bug in Box2dFlash. If you 
compare AddController with CreateController then you can see that both methods 
are doing the same thing, except the assertion in CreateController at the 
begin. This makes absolutely no sense, because the world-object is assigned to 
controller.m_world a few lines below.

Original comment by Uli.He...@googlemail.com on 9 Jan 2011 at 2:26