| PathEngine home | previous: | next: |
Enables the penalty values associated with off-mesh connection to be overlaid and managed dynamically.
void setOverlayConnectionPenalty(tSigned32 connectionIndex, tSigned32 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
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
When overlay penalties are no longer required for a context this overhead can be removed
by calling
| Documentation for PathEngine release 5.29 - Copyright © 2002-2012 PathEngine | next: |