Dash now goes in correct direction

This commit is contained in:
2024-10-21 21:50:20 -07:00
parent 8f09d9ed7e
commit 56dfcaf2aa
2 changed files with 4 additions and 3 deletions

View File

@@ -61,8 +61,8 @@ public class Teo : MonoBehaviour
if (Time.fixedTime-lastDashTime < dashCooldownSeconds) return;
lastDashTime = Time.fixedTime;
transform.position += new Vector3(
Input.mousePosition.x - Screen.width,
Input.mousePosition.y - Screen.height,
Input.mousePosition.x - Screen.width/2,
Input.mousePosition.y - Screen.height/2,
0
).normalized * dashDistance;
Debug.Log(controller.linearVelocity);