Funny
this is one of the tests I made some time ago. Here is something i was also working on:
https://www.babylonjs-playground.com/#R9C0T6#38
This is basically wander/seek/flee behavior of the agents. Green ball represents player an can be moved by clicking on terrain. Hit space to make player hostile or a victim. Agents act accordingly. To get rid of the if/else in the agent AI I’ve ended implementing this in my game via a behavior tree, see this great package: mistreevous - npm (also try the editor)
