I also use Farseer Physics and Artemis ECS. Here is RenderingSystem Process method:
public override void Process(Entity entity, TransformComponent transformComponent, RenderingComponent renderingComponent)
{
Vector2 dimension = transformComponent.Dimension * camera.ScalingFactor;
Vector2 rotationOrigin = new Vector2(dimension.X,dimension.Y)/2;
Vector2 renderingPosition = new Vector2(1, -1) * transformComponent.RenderingPosition * camera.ScalingFactor + camera.BitmapPosition;
Rectangle rectangle = new Rectangle((int)(renderingPosition.X), (int)(renderingPosition.Y), (int)dimension.X, (int)dimension.Y);
spriteBatch.Draw(renderingComponent.Texture, rectangle,
null, Color.Wheat, -transformComponent.Rotation,rotationOrigin, SpriteEffects.None, 0f);
}
And that's what I get if
Vector2 rotationOrigin = new Vector2.Zero;
What's the reason for such a weird behavoir of rotationOrigin parameter and how to correctly rotate the sprite around its center?