Game Development Reference
In-Depth Information
Getting ready
Seek behavior is something similar to the following screenshot:
The preceding image explains the algorithm that will be used to implement the seek beha-
vior. In our case, we will need to seek to the target and have to follow the following al-
gorithm:
Vector desiredVelocity = targetVector - player.locationVector;
desiredVelocity.normalize;
desiredVelocity *= player.maxSpeed;
return (desiredVelocity - agent.locationVector);
Search WWH ::




Custom Search