From 996835826eed6a22e0c89b5bfc2bd14f28501ca3 Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Sun, 12 Sep 2021 21:43:03 +0200 Subject: [PATCH] Do not change FOV when zooming in/out, only move the camera It's odd to both move the camera and change FOV when one wishes to enlarge or smallen the models. Let's only move the camera. --- 3d-viewer/3d_rendering/camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3d-viewer/3d_rendering/camera.cpp b/3d-viewer/3d_rendering/camera.cpp index adb21c3e98..fe4e0782ef 100644 --- a/3d-viewer/3d_rendering/camera.cpp +++ b/3d-viewer/3d_rendering/camera.cpp @@ -173,7 +173,7 @@ void CAMERA::rebuildProjection() m_frustum.nearD = 0.10f; // Ratio width / height of the window display - m_frustum.angle = 45.0f * m_zoom; + m_frustum.angle = 45.0f; m_projectionMatrix = glm::perspective( glm::radians( m_frustum.angle ), m_frustum.ratio, m_frustum.nearD, m_frustum.farD );