dtPathCorridor::moveTargetPosition

Moves the target from the curent location to the desired location, adjusting the corridor as needed to reflect the change.

Windows
MacOS
Linux

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

Syntax

void moveTargetPosition
(
    const float * npos,
    dtNavMeshQuery * navquery,
    const dtQueryFilter * filter
)

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

Parameter

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.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss