{ public class movePlayer : MonoBehavioursss private Rigidbody2D rb; public float speed = 0.5f; private Vector2 moveVector; void Awake() { rb = GetComponent<Rigidbody2D>(); } void Update() { moveVector.x = Input.GetAxis("Horizontal"); moveVector.y = Input.GetAxis("Vertical"); rb.MovePosition(rb.position + moveVector * speed * Time.deltaTime); }}