void Update() { if (Agent.remainingDistance <= Agent.stoppingDistance) { Agent.SetDestination(Agent.RandomPosition(WanderDistance)); } }