I'm making a simple 2D platformer and everything was working fine until i changed my spritebatch.begin from SpriteSortMode.deferred to SpriteSortMode.FrontToBack to change the draw order.
I don't know if this is some strange quirk of spritesortmode, but now all of my sprites are stuck being drawn permanently at what appears to be (0,0) even though in the update loop the sprite's position changes like it should.
the main class passes spritebatch to a scene manager class:
public void draw(Spritebatch spriteBatch)
in sceneManager spriteBatch is passed to a list of actors:
public void Draw(spritebatch)
foreach (Actor actor in actors)
the actor draws itself using spriteBatch :
public void Draw(SpriteBatch spriteBatch)
spriteBatch.Draw(spriteTexture, spritePosition, rectangle, Color.White, 0, spritePosition, 1.0f, SpriteEffects.None, 0.6f);
I'm only calling spritebatch.begin and spritebatch.end once in the whole program. I can control the actor and update its position like normal and it even animates in place but for some reason it won't budge from the upper left corner of the screen.
Thanks in advance for any help!