Max Nielsen
Member
I am receiving the error in the title for the following simple BT:
Code for "Wander around origin":
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);
}