From 83ae31f5ba601556ecf4ec6e72bd076dbb16531a Mon Sep 17 00:00:00 2001
From: ACKERMANNGUE <gawen.ackermann@hesge.ch>
Date: Mon, 24 Mar 2025 13:12:22 +0100
Subject: [PATCH] FIX : Issue with movement (wasn't following local direction)

---
 impulse/Assets/Scripts/Player/PlayerController.cs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/impulse/Assets/Scripts/Player/PlayerController.cs b/impulse/Assets/Scripts/Player/PlayerController.cs
index 3c9059b..1d01961 100644
--- a/impulse/Assets/Scripts/Player/PlayerController.cs
+++ b/impulse/Assets/Scripts/Player/PlayerController.cs
@@ -199,6 +199,7 @@ public class PlayerController : MonoBehaviour
             float theta_z = newPosition[5];
 
             movement = new Vector3(x, 0, z);
+            movement = transform.TransformDirection(movement);
             transform.position += movement * Time.deltaTime * movementSensibility;
 
             Quaternion newRotation = Quaternion.Euler(theta_x, theta_y, theta_z);
-- 
GitLab