In XNA / Farseer I have something like this:
Body body = BodyFactory.CreateRectangle(world, 1f, 2f, 1f); FixtureFactory.AttachCircle(0.5f, 1f, body, new Vector2(0f, 1f));
I have been told that
body.Position property is the center of the AABB of the
Body. In this example it seems not to be so. When I do something like this to display the coordinates of the position I see that they are at the center of the rectangle created at the beginning:
BodyFactory.CreateCircle(world, 0.1f, 1f, Body.Position); BodyFactory.CreateCircle(world, 0.1f, 1f, Body.WorldCenter);
The center of gravity seems also to be the same.
I need this for drawing my texture over the Body. The origin for drawing is then like this:
Vector2 Origin = new Vector2(Sprite.Width / 2, Sprite.Height / 2);
Am I doing something wrong or does the engine not recognize, that a circle fixture is attached to the rectangle? Is there any workaround?