diff options
author | nokoe <nokoe@mailbox.org> | 2024-07-12 00:21:10 +0200 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2024-07-12 00:21:10 +0200 |
commit | bcb1105f8103e20e716e9a3cfb9c0d5cb11db765 (patch) | |
tree | 022731005ab5f96800f7f5be3597c4dcb3bc5aef | |
parent | e6797f288c388fa408cb4d1cb790223e7684e23e (diff) | |
download | hurrycurry-bcb1105f8103e20e716e9a3cfb9c0d5cb11db765.tar hurrycurry-bcb1105f8103e20e716e9a3cfb9c0d5cb11db765.tar.bz2 hurrycurry-bcb1105f8103e20e716e9a3cfb9c0d5cb11db765.tar.zst |
move camera target to the heads of the players
-rw-r--r-- | client/player/follow_camera.gd | 4 |
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) |