Wander stops working

Emile

New member
Hi all,

I have a walking dog AI that performs random tasks.

Right now I only have two tasks implemented (Wander and Drop Dead), but of course I plan to extend this with many more behaviors later on.

At the start of the tree, I set the speed parameters and the duration for which a task should run.

I currently have two Parallel tasks running:

  • one timer task that aborts the current behavior after a certain amount of time
  • one random selector that decides whether the dog should Wander or Drop Dead
So far everything works fine, but quite often the Wander task stops working completely. It seems like the Wander task gets interrupted and is not cleaned up properly afterward.

To be clear... the BT keeps doing the great stuff. It doesn't move anymore after a X amount of time.

I'll attach a screenshot of the behavior tree. All comments on my hard work are welcome :-) .

Thanks!
 

Attachments

  • Wander problem.png
    Wander problem.png
    354.8 KB · Views: 5
Last edited:
Is the task remaining active?

If the Wander task is no longer active then it makes sense that the agent no longer wanders. For this situation you'll need to watch the behavior tree at runtime to determine what is stopping wander.

If the task is still active and the agent isn't wandering then they are likely trying to move to an invalid destination and trying to recompute the new destination but that keeps failing. You'll likely need to adjust some of the wander parameters or the navmesh area.
 
Back
Top