| PathEngine home | previous: | next: |
The collision queries break down into two categories, 'point' collision queries and 'line'
collision queries.
As explained in
A number of line collision queries are provided with different functionality.
Each query accepts a collision context argument.
This controls the set of obstacles to be 'included' for the query.
In general, each query can be invoked on either the
The iAgent methods supply
arguments corresponding to the position and shape
of the agent on which the method is called,
and ensure that the agent itself is excluded from collision.
This can be used to test whether an agent can be placed at a given position.
This can be useful, for example, when using dynamic obstacles to implement switches or trigger systems.
This version of the line collision can be used, for example,
to see if movement is unobstructed from one agent to another, or to a known end position.
This is essentially a test for collision when moving in a direction from a known start position.
The query performs a traversal over the surface of the mesh to determine the actual end position
with respect to overlapping geometry.
This is also essentially a movement in direction query.
This version does some extra work where necessary in order to obtain information about the point of collision.
This can be used then, to implement basic contact physics such as sliding against walls, or pushing obstacles.
The collision queries are very fast,
so these can be used (in addition to managing agent movement)
for generate and test style algorithms.
The path post processing is an example of this.
In this case, curved paths are generated from a base path, and then tested for collision.
Speculative generate and test approaches can also be applied very effectively for
highly interactive behaviours,
such as dodging bullets and so on.
| Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEngine | next: |