I'm using Camera2D from Monogame Extended, which applies a transformation matrix (translation and scale for zooming) to the spritebatch, and I need spine sprites to move and zoom with the camera.
Is there any way of applying the matrix to skeletonRender? What can I do to make the spine skeletons move and scale with camera other than manually updating the xy and scale in each update loop?
Thanks
I managed to solve this after looking at the source code for the runtime by adding this overload method for Begin() in SkeletonMeshRenderer.cs:
public void Begin(Matrix m) {
defaultBlendState = premultipliedAlpha ? BlendState.AlphaBlend : BlendState.NonPremultiplied;
device.RasterizerState = rasterizerState;
device.BlendState = defaultBlendState;
effect.Projection = m * Matrix.CreateOrthographicOffCenter(0, device.Viewport.Width, device.Viewport.Height, 0, 1, 0);
}