World appears to not step, C++

Hi,

I am using Box2D for a small project. I call step like so each frame:

Code: Select all

mPhysicsWorld.Step(1.0f/60.0f, 6, 2);


My body def and fixture defs:

Code: Select all

bodyDef.type = b2_dynamicBody;
fixtureDef.density = mDensity;
fixtureDef.friction = mFriction;


I can have gravity or simply velocity and nothing moves. I have also tried b2_kinematicBody. My fixture defs are all b2PolygonShape (but I have also tried with different shapes with the same result).

Any ideas what is going on and what could I be missing? Thanks
Got it! Spent 10 hours of debugging only to figure out that I wasn't calling my functions in the right order 🙂

Original thread: https://box2d.org/forum/viewtopic.php?t=10157