Skip to content

Commit

Permalink
Prevent view speed from scaling with FOV in parallel projection (#1587)
Browse files Browse the repository at this point in the history
  • Loading branch information
Peregrine05 authored and leMaik committed Oct 7, 2023
1 parent c3ca424 commit 3674dc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chunky/src/java/se/llbit/chunky/renderer/scene/Camera.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3674dc4

Please sign in to comment.