PathEngine home | previous: | next: |
Enables a direction to be associated with the traverse cost for a soft obstacle.
void setTraverseCostDirection(int32_t directionVectorX, int32_t directionVectorY); |
directionVectorX | The x component of the desired direction vector. | ||
directionVectorY | The y component of the desired direction vector. |
An agent's traverse cost direction defaults to [0,0],
which indicates that the agent's
traverse cost acts on movement in all directions.
Setting this direction to a non-zero vector
changes a soft obstacle into a 'directional soft obstacle'.
The traverse cost is then applied only to the component of movement in the specified direction.
Note that no cost is applied to movement at right angles to or away from the specified direction.
The traverse cost direction has no effect on hard obstacles.
Refer to
The traverse cost direction currently associated with an agent can be obtained with
void setTraverseCostDirection(int directionVectorX, int directionVectorY); |
void setTraverseCostDirection(int directionVectorX, int directionVectorY); |
Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEngine | next: |