Game Development Reference
In-Depth Information
Getting ready
There are various ways to implement the wander behaviors. They are as follows:
• Implementing wander using seek and randomness. In this approach, wander brings
together two behaviors, seek and randomness. This means technically wander is
just seeking to some random points and targets in the world.
• The second way is to evaluate a virtual point in front of the character and draw a
circle in front of it, and get point on it circumference. Now, make the object seek
that location. The following image will explain the approach a little better:
We will implement the first approach, so we will follow the following approach:
Get targetVector
while (true) {
Seek (targetVector);
get anotherTargetVector;
}
Search WWH ::




Custom Search