dtPathCorridor::findCorners

Finds the corners in the corridor from the position toward the target.

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

int findCorners
(
    float * cornerVerts,
    unsigned char * cornerFlags,
    dtPolyRef * cornerPolys,
    const int maxCorners,
    dtNavMeshQuery * navquery,
    const dtQueryFilter * filter,
    float pathOffsetDistance,
    float earlyReachDistance,
    bool bAllowEarlyReach
)

Remarks

Finds the corners in the corridor from the position toward the target. (The straightened path.)

This is the function used to plan local movement within the corridor. One or more corners can be detected in order to plan movement. It performs essentially the same function as dtNavMeshQuery::findStraightPath.

Due to internal optimizations, the maximum number of corners returned will be (`maxCorners_ - 1) For example: If the buffers are sized to hold 10 corners, the function will never return more than 9 corners. So if 10 corners are needed, the buffers should be sized for 11 corners.

If the target is within range, it will be the last corner and have a polygon reference id of zero.

Returns

The number of corners returned in the corner buffers. [0 <= value <= `maxCorners_]

Parameters

Parameter

Description

cornerVerts

The corner vertices. [(x, y, z) * cornerCount] [Size: <= maxCorners]

cornerFlags

The flag for each corner. [(flag) * cornerCount] [Size: <= maxCorners]

cornerPolys

The polygon reference for each corner. [(polyRef) * cornerCount] [Size: <= maxCorners]

maxCorners

The maximum number of corners the buffers can hold.

navquery

The query object used to build the corridor.

filter

The filter to apply to the operation.

pathOffsetDistance

[UE4] Radius for path offsetting

earlyReachDistance

[UE4] Radius for early reach detection

bAllowEarlyReach

[UE4] Check if corner skipping for EarlyReachTest is available now

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