public void SetTargetPosition(Vector2 targetposition) { if (transform.position == (Vector3)targetposition) { return; } move = true; foreach (BoxCollider2D box in colliders) { box.enabled = false; } GetPassengers(); this.targetposition = targetposition; if (passenger != null) { passenger.SetMove(false); passengerOffset = Vector2.zero; } }