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.

How could it be done?
