Navigation
API > API/Runtime > API/Runtime/Navmesh > API/Runtime/Navmesh/DetourCrowd > API/Runtime/Navmesh/DetourCrowd/dtPathCorridor
References
| Module | Navmesh |
| Header | /Engine/Source/Runtime/Navmesh/Public/DetourCrowd/DetourPathCorridor.h |
| Include | #include "DetourCrowd/DetourPathCorridor.h" |
| Source | /Engine/Source/Runtime/Navmesh/Private/DetourCrowd/DetourPathCorridor.cpp |
bool optimizePathTopology
(
dtNavMeshQuery * navquery,
const dtQueryFilter * filter
)
Remarks
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.
Parameters
| Name | Description |
|---|---|
| navquery | The query object used to build the corridor. |
| filter | The filter to apply to the operation. |