// Update is called once per frame void Update() { Vector2 delta = waypoints[currentWaypointIndex] - (Vector2)transform.position; if (delta.magnitude < speed) { velocity = delta; nextWaypoint(); } else { velocity = delta.normalized * speed; } movementControllerScript.FindPassengers(); movementControllerScript.Move(velocity); }
public void Update() { movementControllerScript.FindPassengers(); }