Hmm, seems to me that the camera works fine… I just had to apply Matrix.CreateRotationX(MathHelper.PiOver2) to the World Matrix. I don’t know if that’s the optimal solution however, and it breaks my unproject function for getting the mouse world coordinates.
Involving some world matrix doesn’t sound like the right solution here. What world matrix? Those are usually used to place objects in the world. The camera should only be defined by a view and projection matrix.
This, it’s incredible how many people get this wrong and apparently for “good measure” they at least introduce “identity world matrix” for camera… or how many people scale their view matrix while they want to change their projection or the fact how few people realizes that matrices are named according to space they transform to.
Ok, maybe I should have been more clear. Of course I didn’t mean World matrix for the camera. The camera is only defined by view and projection. I’m using SpriteBatch to draw the sprites. As I finally realized that the camera is fine, In order to have the sprites drawn the way I want I’ve set my basicEffect parameter properties to this:
Your unproject/object picking doesn’t work anymore because it assumes objects to be in the XY-plane. You just introduced a 90 degree rotation around X, which puts everything in the XZ-plane.
If you have to rotate the world so things show up where you want them, your camera is not exactly fine. You should fix the camera instead and leave your sprites in XY, otherwise you have to rotate everything you’ll ever draw from now on.