player: clamp camera rotation #2

Merged
jeremy merged 1 commit from devel into master 2026-01-22 18:03:52 +13:00
Showing only changes of commit 545102a139 - Show all commits

View file

@ -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