Box2D Coordinate System?

Hello,

i would like to know how objects are created in box2d? If i call:
Code:
b2BodyDef bodyDef;
bodyDef.type = b2_dynamicBody;
bodyDef.position.Set(1.0f, -1.0f);
body = world->CreateBody(&bodyDef));
b2PolygonShape dynamicBox;
dynamicBox.SetAsBox(1.0f, 1.0f);
b2FixtureDef fixtureDef;
fixtureDef.shape = &dynamicBox;
fixtureDef.density = 0.1f;
fixtureDef.friction = 0.0f;
body->CreateFixture(&fixtureDef);

where is this body? Is the position the center?

Thanks,
tommy
No. You set it to spawn at "1.0f, -1.0f".

Code:
bodyDef.position.Set(1.0f, -1.0f);


Box2D's coordinate system is more or less dependent on your renderer. The ones in the testbed use OpenGL's system (-left +right, +up -down I believe)

-P

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