dtPathCorridor::movePosition

Moves the position from the current 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

bool movePosition
(
    const float * npos,
    dtNavMeshQuery * navquery,
    const dtQueryFilter * filter
)

Remarks

Moves the position from the current 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 position will be located in the adjusted corridor's first polygon.

The expected use case is that the desired position will be 'near' the current corridor. What is considered 'near' depends on local polygon density, query search extents, etc.

The resulting position will differ from the desired position if the desired position is not on the navigation mesh, or it can't be reached using a local search.

Parameters

Parameter

Description

npos

The desired new 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