Hello All!
I am using Box2D 2.2.0 and am hitting an assert in b2World.cpp, inside SolveTOI() method, at line 623:
b2Assert(typeA == b2_dynamicBody || typeB == b2_dynamicBody);
To give you some context, I am prototyping a simple game inside the TestBed project that comes with Box2D (I created a new .h file and I am doing everything there). My code is generating a bunch of dynamic bodies, say 1 per second. At some point, roughly 10sec into the game, I change the type of a dynamic object to be static:
body->SetType(b2_staticBody);
as I no longer want it to move (I tried b2_kinematic as well, but that caused a different assert to fail 😮 ). Other objects continue to bounce off of it, while eventually one of the collisions (not necessarily the first one) triggers the above-mentioned assert. If I comment out the assert in b2World.cpp, then everything works fine (no crashes, no hangs, no noticeable problems at all). Any idea what's going on? Am I doing the dynamic->static conversion incorrectly?
Thanks,
gp
I am using Box2D 2.2.0 and am hitting an assert in b2World.cpp, inside SolveTOI() method, at line 623:
b2Assert(typeA == b2_dynamicBody || typeB == b2_dynamicBody);
To give you some context, I am prototyping a simple game inside the TestBed project that comes with Box2D (I created a new .h file and I am doing everything there). My code is generating a bunch of dynamic bodies, say 1 per second. At some point, roughly 10sec into the game, I change the type of a dynamic object to be static:
body->SetType(b2_staticBody);
as I no longer want it to move (I tried b2_kinematic as well, but that caused a different assert to fail 😮 ). Other objects continue to bounce off of it, while eventually one of the collisions (not necessarily the first one) triggers the above-mentioned assert. If I comment out the assert in b2World.cpp, then everything works fine (no crashes, no hangs, no noticeable problems at all). Any idea what's going on? Am I doing the dynamic->static conversion incorrectly?
Thanks,
gp