Total newbie question about XNA (probably 3D in general).
When I render a simple Blender made cube using the following code everything looks good:
proj = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(90), 800f / 480f, 1f, 4000.0f);
view = Matrix.CreateLookAt(new Vector3(0, 0, -10), new Vector3(0, 0, 10), Vector3.Up);
world = Matrix.CreateTranslation(new Vector3(0, 0, 0));
But when I change the world’s X value to 9 (or any other value that moves it fairly off center) the cube stretches horizontally and looks terrible:
This links shows the problem:
What I am doing wrong to get that stretching? Thanks in advance for any help on this!
You can reduce the perspective distortion by using a narrower field of view. Try using, say, a 45 degree angle instead of a 90 degree angle. Since this “zooms in”, you will have to place the viewMatrix further away to compensate.
edit: I just tried out how much “perspective” distortion you get with a 45 degree angle of view. I’m not sure I see any problematic distortion here.