Вид зверху

    public float moveSpeed = 5.0f;

    Rigidbody2D rb;

    Vector2 movement;    

    void Start()

    {

         rb = GetComponent<Rigidbody2D>();

    }

    void Update()

    {

        movement.x = Input.GetAxisRaw("Horizontal");

        movement.y = Input.GetAxisRaw("Vertical");

    }

    void FixedUpdate()

    {

        rb.MovePosition(rb.position + movement * moveSpeed * Time.fixedDeltaTime);

    }

Відео (eng)