| PathEngine home | previous: | next: |
Finds the shortest path from a given start position to a given end position for agents with a specified collision shape.
iPath* findShortestPath(iShape* shape, const iCollisionContext* context, const cPosition& start, const cPosition& goal) const; |
| shape | The collision shape to use for this query. | ||
| context |
The state of dynamic collision that will apply for this query. An empty context can be specified by passing a value of zero for this argument. | ||
| start |
The start point for pathfinding. This position must be a valid position on this mesh. This start point must be unobstructed. | ||
| goal | The target point for pathfinding. This position must be a valid position on this mesh. |
Requires that pathfinding preprocess has been generated on this mesh for the collision shape specified.
Always returns a newly created
If pathfinding fails then this path will be empty.
Calling this method is functionally equivalent to calling
| Documentation for PathEngine release 5.17 - Copyright © 2002-2008 PathEngine | next: |