我正在显示一个包含一些立方体的场景。相机使用透视。一切都很好,但我希望垂直线是平行的(两点透视:http ://en.wikipedia.org/wiki/Perspective_(graphical)#Two-point_perspective )。
从正面查看立方体时:
我想要的是:
+-----+
| |
| |
+-----+
我得到的(夸张的):
+--------+
\ /
\ /
+--+
我试过摆弄相机的 FOV,但无济于事。
到目前为止我的尝试:
Camera = SceneManager.CreateCamera(CameraName);
float q = 45;
float d = 5000f;
Matrix4 m = new Matrix4(
1, 0, 0, (float)(Math.Sin(q)/d),
0, 1, 0, 0,
0, 0, 1, (float)(Math.Cos(q)/d),
0, 0, 0, 0
);
Camera.SetCustomProjectionMatrix(true, m);