From 545102a13954588c25bcc09f7cd5f81ac735e95e Mon Sep 17 00:00:00 2001 From: Simon Ward Date: Thu, 22 Jan 2026 17:41:39 +1300 Subject: [PATCH] player: clamp camera rotation --- player/camera_gimbal.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/player/camera_gimbal.gd b/player/camera_gimbal.gd index e3d74a2..035053e 100644 --- a/player/camera_gimbal.gd +++ b/player/camera_gimbal.gd @@ -11,7 +11,8 @@ func rotate_camera_y(y, delta): func rotate_camera_x(x, delta): $InnerGimbal.rotate_object_local( Vector3.RIGHT, x * rotation_speed * delta) - + $InnerGimbal.rotation.x = clamp($InnerGimbal.rotation.x,-0.8,0.7) + func _process(delta): # rotate outer gimbal around y axis var y = 0 -- 2.52.0