NavMeshAgent.SamplePathPosition

function SamplePathPosition (passableMask : int, maxDistance : float, out hit : NavMeshHit) : boolean

Parameters

NameDescription
passableMask A mask specifying which NavMesh layers can be passed when tracing the path.
maxDistance Terminate scanning the path at this distance.
hit Holds the properties of the resulting location.

Returns

boolean - True If terminated before reaching position at maxDistance. Otherwise returns false.

Description

Sample a position along the current path.