aboutsummaryrefslogtreecommitdiff
path: root/client/player/follow_camera.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/player/follow_camera.gd')
-rw-r--r--client/player/follow_camera.gd6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/player/follow_camera.gd b/client/player/follow_camera.gd
index 7ca674e0..804a9ebe 100644
--- a/client/player/follow_camera.gd
+++ b/client/player/follow_camera.gd
@@ -75,14 +75,14 @@ func zoom(zoom_dist: float) -> void:
camera_distance_target = clamp(camera_distance_target, MIN_ZOOM, MAX_ZOOM)
func follow(delta):
- if Global.get_setting("gameplay.first_person"):
+ if Settings.read("gameplay.first_person"):
global_position = target.global_position + Vector3.UP * 1.33
rotation = target.rotation + Vector3(0,PI,0)
if target.get_parent() is ControllablePlayer:
target.get_parent().input_rotation = -rotation.y
return
- var invert_factor = -1 if Global.get_setting("gameplay.invert_camera") else 1;
+ var invert_factor = -1 if Settings.read("gameplay.invert_camera") else 1;
if not _disable_input:
angle_target += Input.get_axis("rotate_left", "rotate_right") * ROTATE_SPEED * delta * invert_factor
@@ -99,7 +99,7 @@ func follow(delta):
new_transform.origin = target.position + offset
new_transform = new_transform.looking_at(target.position)
- if Global.get_setting("gameplay.interpolate_camera_rotation"):
+ if Settings.read("gameplay.interpolate_camera_rotation"):
transform.basis = Basis.from_euler(Vector3(
G.interpolate_angle(transform.basis.get_euler().x, new_transform.basis.get_euler().x, delta * LOOK_WEIGHT),
G.interpolate_angle(transform.basis.get_euler().y, new_transform.basis.get_euler().y, delta * LOOK_WEIGHT),