From bcb1105f8103e20e716e9a3cfb9c0d5cb11db765 Mon Sep 17 00:00:00 2001 From: nokoe Date: Fri, 12 Jul 2024 00:21:10 +0200 Subject: move camera target to the heads of the players --- client/player/follow_camera.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/player/follow_camera.gd b/client/player/follow_camera.gd index dec83b61..4fb2d560 100644 --- a/client/player/follow_camera.gd +++ b/client/player/follow_camera.gd @@ -83,7 +83,9 @@ func follow(delta): )) else: transform.basis = new_transform.basis - ground = G.interpolate(ground, target.position, delta * MOVE_WEIGHT) + + # add 0.5, this is the head height + ground = G.interpolate(ground, target.position + Vector3(0., 0.5, 0.), delta * MOVE_WEIGHT) camera_distance_target += Input.get_axis("zoom_in", "zoom_out") * ZOOM_SPEED * delta camera_distance_target = clamp(camera_distance_target, MIN_ZOOM, MAX_ZOOM) -- cgit v1.2.3-70-g09d2