From e7b1780936a8b0762418361f741a313aee0685e5 Mon Sep 17 00:00:00 2001 From: Lorenzo Rossi Date: Sat, 25 Nov 2023 15:02:01 +0100 Subject: [PATCH] Add player facing rotation --- Player.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Player.gd b/Player.gd index 254556c..a98c950 100644 --- a/Player.gd +++ b/Player.gd @@ -45,6 +45,8 @@ func _physics_process(delta): move_and_slide() + rotation.y = velocity.normalized().signed_angle_to(Vector3.FORWARD, Vector3.DOWN) + # Gestisci collisioni for collision_idx in range(get_slide_collision_count()): var collision = get_slide_collision(collision_idx)