Game Development Reference
In-Depth Information
Randomly running agents
Now that we have a number of agents running around in the sandbox, there are some critic-
al things that we need to be aware of. As the sandbox geometry has a lot of bridges and
ledges, our agents will most certainly fall to their death from time to time. This is because
of the way the agent chooses to follow its path. As we're using a steering function that
maximizes the agent's speed regardless of the turning angle, when agents generate a new
path to follow, they will sometimes have a large turning radius that takes them far enough
off the navmesh to fall off a ledge.
Fixing the problem requires you to tune the steering function or replace it all together so
that agents have a quicker turning radius or slower speed. Try experimenting with crouch-
ing and standing agents in order to see how the maximum speed and acceleration can
change the effects of path following.
Search WWH ::




Custom Search