summaryrefslogtreecommitdiff
path: root/client/player
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-12 01:30:53 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-12 01:30:53 +0200
commit55d3fd0c7ead5c47a3fbf63463b70af328e7dcc9 (patch)
tree994c689c3aa3e6ab62ec4bfac1ddf5aabb5f9d7d /client/player
parent177056420c5f31a0fb41e9ce0a67fc90cad4312e (diff)
parent0f0c7713218dc9fc8beafdbe14785c11a0f61ea8 (diff)
downloadhurrycurry-55d3fd0c7ead5c47a3fbf63463b70af328e7dcc9.tar
hurrycurry-55d3fd0c7ead5c47a3fbf63463b70af328e7dcc9.tar.bz2
hurrycurry-55d3fd0c7ead5c47a3fbf63463b70af328e7dcc9.tar.zst
Merge branch 'master' of https://codeberg.org/hurrycurry/hurrycurry
Diffstat (limited to 'client/player')
-rw-r--r--client/player/follow_camera.gd4
1 files changed, 3 insertions, 1 deletions
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)