2D camera?
I'm developing a pure 2D game in XNA. How can I rotate the camera in 2D space? Is there "camera" in 2D?
Actually I have a pretty huge backgorund texture which I'd like to rotate. It would be better rotating a camera object than the whole texture :)
Thanks in advance
Although I am not sure with the entire Texture2D and SpriteBatch usage
along if that's what you're using, but you could just make like a
topview 3D camera and disable any alteration of the Z-axis for the
camera. Giving you a 3D camera which basically acts like a '2D' camera.
If you are using SpriteBatch then there is no camera that you can move to have an effect on everything you draw.
You have 2 choices:
1. Rotate and position everything yourself. e.g. for panning you just have to have an x and y offset that you add to the coordinates.
2. Create your own sprite class that does everything in untransformed coodinates (sprite uses transformed screen coordinates) and then you will be able to control the camera.