Hot answers tagged

2

An assertion failure happens when the expression returns 0, in this case when m_bodyCount is lower or equal to 0. This means that, whenever your code executes b2World::DestroyBody();, all the previously created b2Bodys are already destroyed, if there ever were any created in the first place. If you did create at least one (1) b2Body* instance, make sure ...


1

Typically the fixtures would approximate the shape of the sprite, they're locked to the body and won't change their transformation. So you just draw the sprite with the body's transformation (position/rotation), and don't care about individual fixtures. If you really need to draw the fixtures, see the b2World::DrawDebugData() method implementation. It uses ...


Only top voted, non community-wiki answers of a minimum length are eligible