Hey guys
I just imported the C# and XNA spine runtimes to use in my Monogame game and I'm running into a couple of issues.
First is the rendering issue. For some odd reason my spine draws are always on the bottom layer below all my other objects when they should be mixed in. Drawing is based on position in the map, but it draws the spine object below the background image even.
batch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, mCamera.TranslationMatrix);
...
character.Draw();
batch.End();
//character draw
public void Draw()
{
skeletonRenderer.Begin();
skeletonRenderer.Draw(skeleton);
skeletonRenderer.End();
bounds.Update(skeleton, true);
}
It's all very straightforward straight from the example. I've removed the camera and I still get the same issue.
Second Issue: This involves the camera used to draw. As I update the skeleton position and move it along with the camera, the skeleton offsets more and more based on how much the camera has moved. Is there support to handle this? Maybe I'm just missing some function call to offset the camera matrix?
Thanks for any help you can give.
So it seems the issue is that the skeletonRenderers batches it's own draw calls and doesn't play nice with the spritebatcher. This is a problem though since my game requires that regular both regular 2d textures and units (preferably in spine) overlap one another.
So what are my options here, is there a way to hook up Spine rendering with the spritebatch?