Answer the question
In order to leave comments, you need to log in
Is it possible to get coordinates of shapes attached to b2Body via b2Fixture in Box2D?
I've been digging through the documentation for the Box2D code and haven't found any way to get the coordinates of a shape attached via b2Fixture... I.e. at all.
What do I mean:
b2PolygonShape box_shape;
box_shape.SetAsBox(10 / 2, 10 / 2);
b2FixtureDef fixture_def;
fixture_def.shape = &box;
b2BodyDef body_def;
body_def.type = b2_dynamicBody;
b2Body* body = world.CreateBody(&body_def);
b2Fixture* first_fixture = body->CreateFixture(&fixture_def);
box_shape.SetAsBox(10 / 2, 10 / 2, b2Vec2(10, 10), 0);
b2Fixture* second_fixture = body->CreateFixture(&fixture_def);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question