This question already has an answer here:

I am making a multiplayer coop FPS game. I have created the first monster with it's AI. I have worked out the A* algorithm for the level based on the triangles of the walkable mesh. So I can already find a path from point A to point B in the level. The question is, how would I implement a random wander algorithm?

The simple wander and evade obstacle steering behavior will not do, I think. I probably need to use the Path finding data.

What kind of algorithm do you suggest?


marked as duplicate by MichaelHouse, Josh, Sean Middleditch, bummzack, John McDonald Apr 5 '13 at 17:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The easiest way to do this seems to be to simply generate a random point on the mesh and walk to it. You can restrict the point to be within a radius of the monster's position in order to avoid really long random walks too.


Not the answer you're looking for? Browse other questions tagged or ask your own question.