Monogame: Can I stop a rectangle from moving when I move it's origin?

34 Views Asked by At

I am a beginner to Monogame, so I apologise if this seems like an easy fix. When I draw a premade rectangle (the built-in struct) using spritebatch.Draw() and I move it's centre of rotation (origin) the rectangle appears to move with it.

I wanted to be able to change the rotation origin without causing the rectangle to appear to move, so it can rotate around different points on demand. However If i were to move the centre of rotation (origin) down, for example, the rectangle will appear to move upward. Even though it looks like it moves upwards, it says it's position hasn't changed. I'm pretty sure it's because it increases the height of the actual drawing.

Is there a way to prevent this from happening and make it work the way I intended?

0

There are 0 best solutions below