Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

What I want is a character walking along a path, which is defined as a sequence of waypoints. For example, a soldier patrol around a castle.

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

enter image description here enter image description here

How could it be done?

share|improve this question

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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