PathEngine home previous: iCollisionContext::restoreTemporarilyIgnoredAgent()next: iCollisionContext::setQueryBounds()
Contents, API Reference, Interfaces, iCollisionContext, setOverlayConnectionPenalty



Enables the penalty values associated with off-mesh connection to be overlaid and managed dynamically.


void setOverlayConnectionPenalty(int32_t connectionIndex, int32_t penalty);


connectionIndex The index for the connection for which an overlay penalty is to be set.
(Must be non-negative and less than the number of off-mesh connections on the mesh for which this context was created.)
penalty The penalty value to set for the specified connection.
Must be greater than or equal to -1. Passing a value of -1 disables the connection.


Set connectionIndex to the value returned by iMesh::addOffMeshConnection() for the connection for which the penalty is to be modified.
The supplied penalty value will then be applied when considering paths across this connection, instead of the base penalty value.

Setting overlay connection penalties adds a small additional overhead to pathfinding queries.
You can test if overlay connection penalties have been added to a context with iCollisionContext::hasOverlayConnectionPenalties().
When overlay penalties are no longer required for a context this overhead can be removed by calling iCollisionContext::clearOverlayConnectionPenalties().


C# Mapping

void setOverlayConnectionPenalty(int connectionIndex, int penalty);

Java Mapping

void setOverlayConnectionPenalty(int connectionIndex, int penalty);

Documentation for PathEngine release 6.00 - Copyright © 2002-2016 PathEnginenext: iCollisionContext::setQueryBounds()