What alternatives exist of how an agent can follow the path calculated by a path-finding algorithm?

I've seen that the most easy form is go to one point and when the agent has reached this point, discard it and go to the next point.

I think that this approach has problems when the game has physics with dynamic objects that can block the travel between point A and point B, then the agent is taken from his original trayectory and sometimes go to the last destiny point is not the most natural behavior.

In the literature always I have read that the path is only a suggestion of where the agent has to go, but I don't know how this suggested path must be followed.



2 Answers 2


Path Following
image from http://www.red3d.com/cwr/steer/PathFollow.html

What you're looking for is actually a path following steering behavior. The AI moves to a future point along the path instead of from one point to another. A gray buffer around the path allows the AI to navigate within this region before the AI must steer to stay on the path.

Craig Reynold has an excellent article on how this behavior works and implemented it in the Open Source OpenSteer library

Path Following steering behavior

  • \$\begingroup\$ +1 Just to add you can also factor in the obstacle avoidance steering behaviour and combine the behaviours however you like (weighted sum, prioritized dithering, etc) \$\endgroup\$
    – Ray Dey
    Commented Mar 7, 2011 at 20:39

A lot depends on how movement is handled in your game. If you want your agent to work at avoiding obstacles and such that may occur in real time separate from the original path finding, you may wish to perform a second layer of obstacle avoidance, using the next path node as the "goal".

Methods for doing this are varied, from doing a short range path search to giving the agent "sensors" and having them react to what they notice in their immediate vicinity.

Any method you use will effect it's behavior of course and the recommendations as to what kind would be largely dependent on obstacle density, distance between nodes, and desired agent behavior.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .