PathEngine home | previous: | next: |
In various situations it is desirable to be able to represent the possibility for agents to move
off the ground surfaces of the environment in various ways.
In a video game, for example, it may be desirable to represent the possibility for enemies to jump down
from the floor above to attack the player.
Or it may be necessary to represent the fact that agents can use a lift (elevator) to move between floors of a
building.
PathEngine enables information about these kind of 'off-mesh connections' to be represented with a ground mesh
and integrates any off-mesh connections connections into the search graph when finding paths for agent.
Off-mesh connections are specified in terms of 'endpoints' placed on the surface of a mesh, together with connections between those endpoints.
The following diagrams show two endpoints being placed above and below an overhang between two ground surfaces and then connected together to enable agents to jump down from the overhang.
Endpoint 0 (orange) is placed above the overhang, and endpoint 1 (green) is placed below the overhang.
PathEngine is told about the possibility for agents to move 'off-mesh' in some way from endpoint 0 to endpoint1.
Off mesh connections are directional.
In the example above, a single connection from endpoint 0 to endpoint 1
represents the fact that agents are able to jump down from the overhang but cannot then jump back up.
If two way movement is desired between a pair of endpoints then two connections need to be specified,
one in each direction.
Multiple connections are possible to or from a single endpoint.
A penalty may be specified with each off-mesh connection to specify that there is some cost to that movement.
The cost of moving across the connection is then the straightline distance between the endpoints plus any penalty specified.
In the case of using a connection to represent something like a ladder this could be used to specify that it
will take some time to climb the ladder.
This can also be used simply to bias agent paths against using certain off-mesh connections in the case where alternative paths
are available.
At run-time, the penalty values associated with fixed off-mesh connections can be modified (and turned on or off), and it is also possible to add completely dynamic connections between arbitrary positions on the mesh.
PathEngine provides a framework for automated generation of off-mesh connections, based on an application supplied callback for validation of generated connection candidates.
Refer to this page for more detailed information about working with off-mesh connections.
Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEngine | next: |