MonoGame & Farseer Physics: Body and Texture offset

My problem is that my Farseer bodies are not matching the position of the texture. There’s a little offset and I’ve no idea why that’s happening. I wanted to ask if someone has an idea how to solve it or experienced something similar to that.


I’m using MonoGame: 3.5, Farseer: 3.5

Thanks :slight_smile:

  class TestActor
    Body rigidbody;
    Texture2D texture;
    Vector2 position = new Vector2(6.5f, 0f);

    public TestActor()
        //  texture = Game1.content.Load<Texture2D>("Sprites/tileset");
        texture = Game1.content.Load<Texture2D>("Test/box");

        rigidbody = BodyFactory.CreateRectangle(, ConvertUnits.ToSimUnits(texture.Width), ConvertUnits.ToSimUnits(texture.Width), 1.0f, position);
        rigidbody.BodyType = BodyType.Dynamic;
        rigidbody.Restitution = 0.3f;
        rigidbody.Friction = 0.5f;
        rigidbody.CollidesWith = Category.All;

    public Body body
        get { return body; }

    public void Update()
        //rigidbody.ApplyForce(new Vector2(2, 2));

    public void Draw(SpriteBatch spriteBatch)
        spriteBatch.Draw(texture, ConvertUnits.ToDisplayUnits(rigidbody.Position), null, Color.White, rigidbody.Rotation, 
            new Vector2(texture.Width / 2.0f, texture.Height / 2.0f), 1f, SpriteEffects.None, 1f);

I found the issue finally.
It turned out it was my matrix that were not fitting correctly ^-^