fixed fov in 3D mode

This commit is contained in:
codeimp 2008-09-24 22:10:22 +00:00
parent 90c7beb17d
commit 51679564a9

View file

@ -106,8 +106,8 @@ namespace CodeImp.DoomBuilder.Rendering
// This creates the projection
internal void CreateProjection()
{
// Read the FOV from configuration
float fov = General.Settings.VisualFOV;
// Calculate FOV
float fov = Angle2D.DegToRad((float)General.Settings.VisualFOV);
// Calculate aspect
float aspect = (float)General.Map.Graphics.RenderTarget.ClientSize.Width /
@ -132,7 +132,7 @@ namespace CodeImp.DoomBuilder.Rendering
anglez = delta.GetAngleZ();
// Make the view matrix
view = Matrix.LookAtRH(D3DDevice.V3(pos), D3DDevice.V3(lookat), new Vector3(0f, 0f, -1f));
view = Matrix.LookAtRH(D3DDevice.V3(pos), D3DDevice.V3(lookat), new Vector3(0f, 0f, 1f));
// Make the billboard matrix
billboard = Matrix.RotationYawPitchRoll(0f, anglexy, anglez - Angle2D.PIHALF);