| PathEngine home | previous: | next: |
Specifies if the obstacle should function as a 'soft obstacle', and specifies the traversal cost.
void setTraverseCost(float cost); |
| cost | The additional cost to be applied to parts of a path that cross this obstacle, or -1.f to indicate that the obstacle should function as a traditional 'hard obstacle'. |
An agent's traverse cost defaults to -1
which indicates that the agent should function as a traditional 'hard obstacle'.
Setting the traverse cost to a value >= 0.f specifies that the agent should behave
as a 'soft obstacle'.
You can switch the agent back to behaving as a hard obstacle by setting the traverse cost back to -1.f
Refer to
The traverse cost currently associated with an agent can be obtained with
| Documentation for PathEngine release 5.16 - Copyright © 2002-2008 PathEngine | next: |