aboutsummaryrefslogtreecommitdiff
path: root/client/player
diff options
context:
space:
mode:
Diffstat (limited to 'client/player')
-rw-r--r--client/player/follow_camera.gd6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/player/follow_camera.gd b/client/player/follow_camera.gd
index f0d5700d..e3ba5e92 100644
--- a/client/player/follow_camera.gd
+++ b/client/player/follow_camera.gd
@@ -50,6 +50,12 @@ func _process(delta):
if target != null:
follow(delta)
+func _input(event):
+ if Input.is_action_just_pressed("reset"):
+ angle_target = 0
+ angle_up_target = 1
+ camera_distance_target = 10
+
func follow(delta):
angle_target += Input.get_axis("rotate_left", "rotate_right") * ROTATE_SPEED * delta
angle = lerp_angle(angle, angle_target, delta * ROTATE_WEIGHT)