// Update is called once per frame void Update() { if (IsIdle()) { Body.transform.position = Destination; Movement.AddMovement(Vector2.zero); } else { Movement.AddMovement((Destination - (Vector2)Body.transform.position).normalized); } }
private void FixedUpdate() { Movement.AddMovement(new Vector2(Input.GetAxis(HorisontalAxis), Input.GetAxis(VerticalAxis))); }