From a5e79b7663532b4420d91ee9adb7265f06847624 Mon Sep 17 00:00:00 2001 From: victorfisac Date: Fri, 8 Jan 2016 02:53:26 +0100 Subject: [PATCH] Fixed small glitch on zoom-in with mouse wheel It seems that now works. Tested all free camera features with some directions and positions and no unexpected behaviours detected. I don't know if those lines are really indispensable. --- src/camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/camera.c b/src/camera.c index f2ac3275..4768b176 100644 --- a/src/camera.c +++ b/src/camera.c @@ -317,7 +317,7 @@ static void ProcessCamera(Camera *camera, Vector3 *playerPosition) camera->target.y += mouseWheelMove*(camera->target.y - camera->position.y)*CAMERA_SCROLL_SENSITIVITY/cameraTargetDistance; camera->target.z += mouseWheelMove*(camera->target.z - camera->position.z)*CAMERA_SCROLL_SENSITIVITY/cameraTargetDistance; - if (camera->target.y < 0) camera->target.y = -0.001; + // if (camera->target.y < 0) camera->target.y = -0.001; } else if ((camera->position.y > camera->target.y) && (camera->target.y < 0) && (mouseWheelMove > 0)) { @@ -337,7 +337,7 @@ static void ProcessCamera(Camera *camera, Vector3 *playerPosition) camera->target.y += mouseWheelMove*(camera->target.y - camera->position.y)*CAMERA_SCROLL_SENSITIVITY/cameraTargetDistance; camera->target.z += mouseWheelMove*(camera->target.z - camera->position.z)*CAMERA_SCROLL_SENSITIVITY/cameraTargetDistance; - if (camera->target.y > 0) camera->target.y = 0.001; + // if (camera->target.y > 0) camera->target.y = 0.001; } else if ((camera->position.y < camera->target.y) && (camera->target.y > 0) && (mouseWheelMove > 0)) {