From 8e49c169290ddb2cfe9b4cbc3e5acdc5206af93b Mon Sep 17 00:00:00 2001 From: Roz K Date: Sat, 31 Dec 2022 22:30:57 +0100 Subject: [PATCH] Fix camera yaw and pitch. --- game/game.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/game.py b/game/game.py index 2f5544c..bb7ef21 100644 --- a/game/game.py +++ b/game/game.py @@ -57,7 +57,7 @@ def update_camera(time, mouse, camera, environment): camera_yaw = mouse.drag[0] * 0.001 camera_pitch = mouse.drag[1] * 0.001 + pi * 0.25 camera_distance = mouse.wheel * 20.0 - camera.set_view(camera_yaw, camera_pitch, camera_distance) + camera.set_view(camera_yaw % tau, camera_pitch % tau, camera_distance) environment.from_sun(camera.view, sun_direction, sun_power) def update_tests(time, blob, cube, clouds):