Navigation
API > API/Runtime > API/Runtime/Navmesh > API/Runtime/Navmesh/dtNavMesh
Description
Gets the endpoints for an off-mesh connection, ordered by "direction of travel".
Off-mesh connections are stored in the navigation mesh as special 2-vertex polygons with a single edge. At least one of the vertices is expected to be inside a normal polygon. So an off-mesh connection is "entered" from a normal polygon at one of its endpoints. This is the polygon identified by the prevRef parameter. For segment links, find the starting position closest to currentPos return the end position closest to that starting position. If currentPos is not provided, use the midpoint on the starting edge as the starting position.
| Name | getOffMeshConnectionPolyEndPoints |
| Type | function |
| Header File | /Engine/Source/Runtime/Navmesh/Public/Detour/DetourNavMesh.h |
| Include Path | #include "Detour/DetourNavMesh.h" |
| Source | /Engine/Source/Runtime/Navmesh/Private/Detour/DetourNavMesh.cpp |
dtStatus getOffMeshConnectionPolyEndPoints
(
dtPolyRef prevRef,
dtPolyRef polyRef,
const dtReal * currentPos,
dtReal * startPos,
dtReal * endPos
) const
The status flags for the operation.
Parameters
| Name | Remarks |
|---|---|
| prevRef | The reference of the polygon before the connection. |
| polyRef | The reference of the off-mesh connection polygon. |
| currentPos | Position before entering off-mesh connection [(x, y, z)] |
| startPos | The start position of the off-mesh connection. [(x, y, z)] |
| endPos | The end position of the off-mesh connection. [(x, y, z)] |