Navigation
Unreal Engine C++ API Reference > 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 |
void moveTargetPosition
&40;
const dtReal &42; npos,
dtNavMeshQuery &42; navquery,
const dtQueryFilter &42; filter
&41;
Remarks
Moves the target from the curent location to the desired location, adjusting the corridor as needed to reflect the change.
Behavior:
- The movement is constrained to the surface of the navigation mesh.
- The corridor is automatically adjusted (shorted or lengthened) in order to remain valid.
- The new target will be located in the adjusted corridor's last polygon.
The expected use case is that the desired target will be 'near' the current corridor. What is considered 'near' depends on local polygon density, query search extents, etc.
The resulting target will differ from the desired target if the desired target is not on the navigation mesh, or it can't be reached using a local search.
Parameters
Name | Description |
---|---|
npos | The desired new target position. [(x, y, z)] |
navquery | The query object used to build the corridor. |
filter | The filter to apply to the operation. |