New answers tagged

0

Not really sure what causes the problem, but I think you should be disposing and recreating your RayHandler each time which internally takes care of disposing all the lights. Have a look at the wiki.


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 ...


0

The issue was that i was deleting every pointer to b2 objects in a class itself.


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 ...


Top 50 recent answers are included