Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

marked as duplicate by Byte56, Josh Petrie, 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.

1 Answer 1

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.

share|improve this answer

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