Rework movement system to use deltaTime and GetAxisRaw

This commit is contained in:
2024-10-22 17:56:20 -07:00
parent f844d05ed5
commit 4c518e9c55
5 changed files with 11 additions and 7 deletions

View File

@@ -29,9 +29,9 @@ public class Teo : MonoBehaviour
// Move player
if (!dashing) {
controller.AddRelativeForce (new Vector2 (
Input.GetAxis("Horizontal"),
Input.GetAxis("Vertical")
).normalized * moveSpeed);
Input.GetAxisRaw("Horizontal"),
Input.GetAxisRaw("Vertical")
).normalized * moveSpeed * Time.deltaTime);
}
// Attack on click if not on cooldown
if (Input.GetMouseButtonDown(0)) {