Hello,
I'm using the latest version of Box2D from google repository. Indeed the polygons (triangles in my case) can be much thinner now.
But still there are some cases where trying to add a very small triangle to a body will cause an assertion failure in b2Body::ResetMassData()
(more specifically in line 312: b2Assert(m_I > 0.0f);).
In the previous version (stable release), I used to avoid assertion errors for very thin triangles by copying the corresponding
piece of code from inside the Box2D source and placing it into some function which would return true or false (depending on whether the triangle
would cause and error or not).
I think it would be nice if such methods existed in the API. (For example b2Body::canCreateFixture(b2FixtureDef* pFixtureDef)).
Thanks,
Dimitris
I'm using the latest version of Box2D from google repository. Indeed the polygons (triangles in my case) can be much thinner now.
But still there are some cases where trying to add a very small triangle to a body will cause an assertion failure in b2Body::ResetMassData()
(more specifically in line 312: b2Assert(m_I > 0.0f);).
In the previous version (stable release), I used to avoid assertion errors for very thin triangles by copying the corresponding
piece of code from inside the Box2D source and placing it into some function which would return true or false (depending on whether the triangle
would cause and error or not).
I think it would be nice if such methods existed in the API. (For example b2Body::canCreateFixture(b2FixtureDef* pFixtureDef)).
Thanks,
Dimitris