Wander Within an Area

willij

New member
Anyone have some ideas on how I can modify the wander task to have an agent wander within an area? The agent can go outside the area but cannot go too far before it needs to come back. I want it to be more natural than having a wall they can't cross or having a condition where if they leave it they must immediately turn around and come back. So more like, if they wander out they should wander back in eventually.
 
Within Wander I would change TrySetTarget to check the position before it returns a valid destination. If the position is not valid then it should generate another position.
 
Top