]> Untitled Git - mushroom-game.git/blobdiff - player/player.gd
Squashed commit of the following:
[mushroom-game.git] / player / player.gd
index fdaf988ece0afd1a1e223e68a5692f8218896488..21a930b7e1ca56db892f641df606189877e98334 100644 (file)
@@ -2,14 +2,14 @@ extends CharacterBody3D
 
 
 const SPEED = 5.0
-const CAMERA_ROTATE_RATE = PI / 12
+const CAMERA_ROTATE_RATE = PI / 6
 
 
 # rotate camera
 func _unhandled_input(event: InputEvent) -> void:
-       if event.is_action("camera-rotate-left"):
+       if event.is_action_pressed("camera-rotate-left"):
                $cameraPivot.rotate_y(CAMERA_ROTATE_RATE)
-       elif event.is_action("camera-rotate-right"):
+       elif event.is_action_pressed("camera-rotate-right"):
                $cameraPivot.rotate_y(-CAMERA_ROTATE_RATE)