From 3674dc4dfa94b72c22998c1837747ce3dc4a1d63 Mon Sep 17 00:00:00 2001 From: Peregrine05 <92183530+Peregrine05@users.noreply.github.com> Date: Fri, 30 Jun 2023 00:07:59 +0200 Subject: [PATCH] Prevent view speed from scaling with FOV in parallel projection (#1587) --- chunky/src/java/se/llbit/chunky/renderer/scene/Camera.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chunky/src/java/se/llbit/chunky/renderer/scene/Camera.java b/chunky/src/java/se/llbit/chunky/renderer/scene/Camera.java index b79f72db84..520ef6c122 100644 --- a/chunky/src/java/se/llbit/chunky/renderer/scene/Camera.java +++ b/chunky/src/java/se/llbit/chunky/renderer/scene/Camera.java @@ -422,7 +422,8 @@ private void onViewChange() { * Rotate the camera */ public synchronized void rotateView(double yaw, double pitch) { - double fovRad = QuickMath.degToRad(fov / 2); + double fovRad = (this.projectionMode == ProjectionMode.PARALLEL) ? 0.5 : QuickMath.degToRad(fov / 2); + this.yaw += yaw * fovRad; this.pitch += pitch * fovRad;