Navigation
API > API/Runtime > API/Runtime/Navmesh > API/Runtime/Navmesh/dtPathCorridor
Description
Attempts to optimize the path using a local area search. (Partial replanning.)
Inaccurate locomotion or dynamic obstacle avoidance can force the agent position significantly outside the original corridor. Over time this can result in the formation of a non-optimal corridor. This function will use a local area path search to try to re-optimize the corridor.
The more inaccurate the agent movement, the more beneficial this function becomes. Simply adjust the frequency of the call to match the needs to the agent.
| Name | optimizePathTopology |
| Type | function |
| Header File | /Engine/Source/Runtime/Navmesh/Public/DetourCrowd/DetourPathCorridor.h |
| Include Path | #include "DetourCrowd/DetourPathCorridor.h" |
| Source | /Engine/Source/Runtime/Navmesh/Private/DetourCrowd/DetourPathCorridor.cpp |
bool optimizePathTopology
(
dtNavMeshQuery * navquery,
const dtQueryFilter * filter
)
Parameters
| Name | Remarks |
|---|---|
| navquery | The query object used to build the corridor. |
| filter | The filter to apply to the operation. |