PathEngine home previous: Using PathEngine with Multithreaded Applicationsnext: PathEngine Angles
Contents, Programmers Guide, Applying the SDK, Working with Off‑Mesh Connections

Working with Off-Mesh Connections

Refer to Off‑Mesh Connections for an overview of the functionality provided for representing off-mesh movement possibilities for agents.

Working with paths that contain off-mesh connections

Paths containing off-mesh connections simply include the endpoints before and after the connection in sequence.
A method is provided to enable the application to check whether a given path segment corresponds to an off-mesh movement.
For details about using PathEngine's advance along path functionality with off-mesh connections, refer to this page.

API details

Off-mesh connections are added with the following methods:

Off-mesh connections and endpoint can be removed from a mesh by calling iMesh::clearOffMeshConnectionsAndEndPoints().

The connections and endpoints associated with a mesh can be queried with the following methods:

The set of off-mesh connections associated with a mesh cannot be changed after preprocess has been generated or loaded for that mesh.

Off-mesh connections may be added to a mesh at content generation time and saved out with the mesh.
The connections will then be loaded with the mesh when the mesh is loaded at run-time.

Controlling off-mesh connection costs dynamically

The various methods for modifying the set of off mesh connections, above, can only be called before preprocess generation for a given mesh, with a final set of connections then essentially immutable during run-time pathfinding.

While the actual set of connections cannot be changed at run-time, however, it is possible to control the per-connection costs dynamically, and at the level of individual collision contexts.

Use iCollisionContext::setOverlayConnectionPenalty() to modify the penalty for a given connection, and iCollisionContext::clearOverlayConnectionPenalties() to clear any overlays and return to the default set of connection costs.


Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEnginenext: PathEngine Angles