| PathEngine home | previous: | next: |
Builds a path for movement in the specified direction through direct collision tests with sliding against any obstructions encountered.
iPath* buildCollideAndSlidePath(iShape* shape, const iCollisionContext* context, const cPosition& start, tSigned32 directionVectorX, tSigned32 directionVectorY, tSigned32 distance) 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 the path. This position must be a valid position on this mesh and must not be obstructed (either by static or dynamic obstacles). | ||
| directionVectorX | X coordinate of the direction vector for agent movement. | ||
| directionVectorY | Y coordinate of the direction vector for agent movement. | ||
| distance |
Total distance to move. This is applied approximately, with the total length of the resulting path roughly matching the value given for this parameter when movement is not blocked. |
The path generated is similar to the effect of an agent attempting to move continuously in the given direction
and sliding against obstruction boundaries.
Note that the method doesn't cut corners at changes in movement direction, with the resulting path then
generally not the shortest path to its end position.
| Documentation for PathEngine release 5.17 - Copyright © 2002-2008 PathEngine | next: |