Implementing steering behaviors
The strategies that we will cover here have been taken from Craig Reynolds's paper Steering Behaviors for Autonomous Characters, written in 1999. It has become a well-known reference for implementing autonomous motion in an easy manner for non-playable characters.
You can check out the online version at http://www.red3d.com/cwr/steer/gdc99/. In this section, you will learn how to implement the following kinds of behavior:
- Seek and flee
- Pursuit and evade
- Obstacle avoidance
Seek and flee
The seek behavior moves the character towards a specific position in the space. This behavior is based on the combination of two forces: the character's velocity and the steering force. This force is calculated as the difference ...