MOD: Player Movement

ADD: Player Prefab
ADD: Ground Prefab
ADD: Cinemachine
This commit is contained in:
2024-06-14 11:23:51 +02:00
parent b40666e863
commit af24ed5c5b
10 changed files with 949 additions and 258 deletions

View File

@@ -16,6 +16,7 @@ public class PlayerMover : MonoBehaviour
void Start()
{
rb = GetComponent<Rigidbody2D>();
rb.gravityScale = 0;
}
// Update is called once per frame
@@ -43,6 +44,8 @@ public class PlayerMover : MonoBehaviour
moveDirection.Normalize();
}
rb.velocity = moveDirection * speed;
rb.velocity = moveDirection * speed * Time.deltaTime * 1000;
}
}