dtNavMeshQuery::findPath

Finds a path from the start polygon to the end polygon.

Windows
MacOS
Linux

References

Module

Navmesh

Header

/Engine/Source/Runtime/Navmesh/Public/Detour/DetourNavMeshQuery.h

Include

#include "Detour/DetourNavMeshQuery.h"

Source

/Engine/Source/Runtime/Navmesh/Private/Detour/DetourNavMeshQuery.cpp

Syntax

dtStatus findPath
(
    dtPolyRef startRef,
    dtPolyRef endRef,
    const float * startPos,
    const float * endPos,
    const float costLimit,
    const dtQueryFilter * filter,
    dtQueryResult & result,
    float * totalCost
) const

Remarks

Finds a path from the start polygon to the end polygon.

If the end polygon cannot be reached through the navigation graph, the last polygon in the path will be the nearest the end polygon.

If the path array is to small to hold the full result, it will be filled as far as possible from the start polygon toward the end polygon.

The start and end positions are used to calculate traversal costs. (The y-values impact the result.)

Parameters

Parameter

Description

startRef

The reference id of the start polygon.

endRef

The reference id of the end polygon.

startPos

A position within the start polygon. [(x, y, z)]

endPos

A position within the end polygon. [(x, y, z)]

costLimit

Cost limit of nodes allowed to be added to the open list //

filter

The polygon filter to apply to the query.

result

Results for path corridor, fills in refs and costs for each poly from start to end

totalCost

If provided will get filled will total cost of path

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