Max Nielsen
Member
I am receiving the error in the title for the following simple BT:
![1650996404167.png 1650996404167.png](http://www.opsive.com/forum/data/attachments/8/8664-534b20260be184f117e06873b3ea4f5b.jpg)
Code for "Wander around origin":
![1650996404167.png 1650996404167.png](http://www.opsive.com/forum/data/attachments/8/8664-534b20260be184f117e06873b3ea4f5b.jpg)
Code for "Wander around origin":
Code:
public override TaskStatus OnUpdate()
{
if (Time.time - destinationSetTime > pauseTime)
{
SetDestination();
}
return TaskStatus.Running;
}
void SetDestination()
{
agent.SetDestination(Utils_GPS.GenerateRandomPoint(agent.originUsedForWander, Random.Range(minWanderDistance.Value, maxWanderDistance.Value)));
destinationSetTime = Time.time;
pauseTime = Random.Range(minTimeBetweenDestinations.Value, maxTimeBetweenDestinations.Value);
}