I’m trying to flip the Y-axis in the camera, so up is +ve Y because I need this in the world calculations to make my life easier, everything was fine until I tried
Matrix.CreateScale(1, -1, 1);
Now Nothing is showing on screen. Is this the right way to do it? Should I do other things to fix the negative scale sprite-wise?
My Camera class does the matrix like this
It might not be drawing your sprites because mirroring them vertically changes their vertex order from clockwise to counter-clockwise. So the GPU thinks you’re looking at the back of the triangles and not the front. Try this:
I was able to solve it thanks to @Quasar, the negative scale indeed changed the vertex order, and the flipped culling i.e., RasterizerState.CullClockwise fixed it, for anyone with the same problem I’ve used this:
Matrix.CreateOrthographicOffCenter didn’t work for me, idk why, but I’m guessing because Matrix.CreateOrthographicOffCenter gives a projection matrix, but SpriteBatch.Draw expects a world matrix, maybe.