I want is a character to walk along a path defined as a waypoint sequence. For example, a soldier patrolling around a castle.

However, I want the soldier to avoid (dynamic) obstacles, without deviating from the path too much.

Patrol route without obstruction Obstructed patrol route and corrected path

How can this be done?


Remove from the path any waypoints that lie inside the obstacle and then use your favorite pathfinding routine to connect the waypoints remaining on each side.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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