UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMetaNavMeshPath Struct Reference

#include <MetaNavMeshPath.h>

+ Inheritance diagram for FMetaNavMeshPath:

Public Types

typedef FNavMeshPath Super
 
- Public Types inherited from FNavMeshPath
typedef FNavigationPath Super
 

Public Member Functions

AIMODULE_API FMetaNavMeshPath ()
 
AIMODULE_API FMetaNavMeshPath (const TArray< FMetaPathWayPoint > &InWaypoints, const ANavigationData &NavData)
 
AIMODULE_API FMetaNavMeshPath (const TArray< FMetaPathWayPoint > &InWaypoints, const AController &Owner)
 
AIMODULE_API FMetaNavMeshPath (const TArray< FVector > &InWaypoints, const ANavigationData &NavData)
 
AIMODULE_API FMetaNavMeshPath (const TArray< FVector > &InWaypoints, const AController &Owner)
 
virtual AIMODULE_API void Initialize (const FVector &AgentLocation)
 
virtual AIMODULE_API bool ConditionalMoveToNextSection (const FVector &AgentLocation, EMetaPathUpdateReason Reason)
 
AIMODULE_API bool ForceMoveToNextSection (const FVector &AgentLocation)
 
virtual AIMODULE_API bool UpdatePath (const FVector &AgentLocation)
 
virtual AIMODULE_API void CopyFrom (const FMetaNavMeshPath &Other)
 
bool IsLastSection () const
 
int32 GetTargetWaypointIndex () const
 
int32 GetNumWaypoints () const
 
const TArray< FMetaPathWayPoint > & GetWaypointArray () const
 
AActorGetMetaPathGoal () const
 
AIMODULE_API bool SetWaypoints (const TArray< FMetaPathWayPoint > &InWaypoints)
 
AIMODULE_API bool SetWaypoints (const TArray< FVector > &InWaypoints)
 
float GetWaypointSwitchRadius () const
 
void SetWaypointSwitchRadius (float InSwitchRadius)
 
virtual AIMODULE_API FVector::FReal GetLengthFromPosition (FVector SegmentStart, uint32 NextPathPointIndex) const override
 
virtual AIMODULE_API FVector::FReal GetCostFromIndex (int32 PathPointIndex) const override
 
virtual AIMODULE_API void DebugDraw (const ANavigationData *NavData, const FColor PathColor, UCanvas *Canvas, const bool bPersistent, const float LifeTime, const uint32 NextPathPointIndex=0) const override
 
- Public Member Functions inherited from FNavMeshPath
NAVIGATIONSYSTEM_API FNavMeshPath ()
 
NAVIGATIONSYSTEM_API ~FNavMeshPath ()
 
NAVIGATIONSYSTEM_API FNavMeshPath (const FNavMeshPath &)
 
NAVIGATIONSYSTEM_API FNavMeshPath (FNavMeshPath &&Other)
 
NAVIGATIONSYSTEM_API FNavMeshPathoperator= (const FNavMeshPath &Other)
 
NAVIGATIONSYSTEM_API FNavMeshPathoperator= (FNavMeshPath &&Other)
 
void SetWantsStringPulling (const bool bNewWantsStringPulling)
 
bool WantsStringPulling () const
 
bool IsStringPulled () const
 
NAVIGATIONSYSTEM_API void PerformStringPulling (const FVector &StartLoc, const FVector &EndLoc)
 
void SetWantsPathCorridor (const bool bNewWantsPathCorridor)
 
bool WantsPathCorridor () const
 
const TArray< FNavigationPortalEdge > & GetPathCorridorEdges () const
 
void SetPathCorridorEdges (const TArray< FNavigationPortalEdge > &InPathCorridorEdges)
 
void OnPathCorridorUpdated ()
 
NAVIGATIONSYSTEM_API bool ContainsWithSameEnd (const FNavMeshPath *Other) const
 
NAVIGATIONSYSTEM_API void OffsetFromCorners (FVector::FReal Distance)
 
NAVIGATIONSYSTEM_API void ApplyFlags (int32 NavDataFlags)
 
virtual NAVIGATIONSYSTEM_API void ResetForRepath () override
 
NAVIGATIONSYSTEM_API bool GetNodeFlags (int32 NodeIdx, FNavMeshNodeFlags &Flags) const
 
virtual FVector::FReal GetCostFromNode (NavNodeRef PathNode) const override
 
FVector::FReal GetTotalPathLength () const
 
int32 GetNodeRefIndex (const NavNodeRef NodeRef) const
 
virtual bool ContainsNode (NavNodeRef NodeRef) const override
 
virtual bool ContainsCustomLink (FNavLinkId UniqueLinkId) const override
 
virtual bool ContainsAnyCustomLink () const override
 
NAVIGATIONSYSTEM_API bool IsPathSegmentANavLink (const int32 PathSegmentStartIndex) const
 
virtual NAVIGATIONSYSTEM_API bool DoesIntersectBox (const FBox &Box, uint32 StartingIndex=0, int32 *IntersectingSegmentIndex=NULL, FVector *AgentExtent=NULL) const override
 
virtual NAVIGATIONSYSTEM_API bool DoesIntersectBox (const FBox &Box, const FVector &AgentLocation, uint32 StartingIndex=0, int32 *IntersectingSegmentIndex=NULL, FVector *AgentExtent=NULL) const override
 
virtual NAVIGATIONSYSTEM_API FVector GetSegmentDirection (uint32 SegmentEndIndex) const override
 
NAVIGATIONSYSTEM_API void Invert ()
 
- Public Member Functions inherited from FNavigationPath
 DECLARE_MULTICAST_DELEGATE_TwoParams (FPathObserverDelegate, FNavigationPath *, ENavPathEvent::Type)
 
NAVIGATIONSYSTEM_API FNavigationPath ()
 
NAVIGATIONSYSTEM_API FNavigationPath (const TArray< FVector > &Points, AActor *Base=NULL)
 
virtual NAVIGATIONSYSTEM_API ~FNavigationPath ()
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS FNavigationPath (const FNavigationPath &)=default
 
FNavigationPathoperator= (const FNavigationPath &Other)=default
 
PRAGMA_ENABLE_DEPRECATION_WARNINGS bool IsValid () const
 
bool IsUpToDate () const
 
bool IsReady () const
 
bool IsPartial () const
 
bool DidSearchReachedLimit () const
 
bool IsErrorStartLocationNonNavigable () const
 
bool IsErrorEndLocationNonNavigable () const
 
bool IsWaitingForRepath () const
 
void SetManualRepathWaiting (const bool bInWaitingForRepath)
 
bool ShouldUpdateStartPointOnRepath () const
 
bool ShouldUpdateEndPointOnRepath () const
 
FVector GetDestinationLocation () const
 
FPathObserverDelegateGetObserver ()
 
FDelegateHandle AddObserver (FPathObserverDelegate::FDelegate NewObserver)
 
void RemoveObserver (FDelegateHandle HandleOfObserverToRemove)
 
void MarkReady ()
 
void SetNavigationDataUsed (const ANavigationData *const NewData)
 
ANavigationDataGetNavigationDataUsed () const
 
void SetQuerier (const UObject *InQuerier)
 
const UObjectGetQuerier () const
 
void SetQueryData (const FPathFindingQueryData &QueryData)
 
FPathFindingQueryData GetQueryData () const
 
void SetIsPartial (const bool bPartial)
 
void SetSearchReachedLimit (const bool bLimited)
 
void SetErrorStartLocationNonNavigable (const bool bErrorNonNavigable)
 
void SetErrorEndLocationNonNavigable (const bool bErrorNonNavigable)
 
void SetFilter (FSharedConstNavQueryFilter InFilter)
 
FSharedConstNavQueryFilter GetFilter () const
 
AActorGetBaseActor () const
 
FVector GetStartLocation () const
 
FVector GetEndLocation () const
 
void DoneUpdating (ENavPathUpdateType::Type UpdateType)
 
double GetTimeStamp () const
 
void SetTimeStamp (double TimeStamp)
 
NAVIGATIONSYSTEM_API void Invalidate ()
 
NAVIGATIONSYSTEM_API void RePathFailed ()
 
NAVIGATIONSYSTEM_API void RemoveOverlappingPoints (const FVector &Tolerance)
 
virtual bool ContainsCustomLink (uint32 UniqueLinkId) const final
 
FVector::FReal GetCost () const
 
FVector::FReal GetLength () const
 
const TArray< FNavPathPoint > & GetPathPoints () const
 
TArray< FNavPathPoint > & GetPathPoints ()
 
NAVIGATIONSYSTEM_API FBasedPosition GetPathPointLocation (uint32 Index) const
 
template<typename PathClass >
const PathClassCastPath () const
 
template<typename PathClass >
PathClassCastPath ()
 
NAVIGATIONSYSTEM_API void SetGoalActorObservation (const AActor &ActorToObserve, float TetherDistance)
 
void SetGoalActorTetherDistance (const float NewTetherDistace)
 
NAVIGATIONSYSTEM_API void DisableGoalActorObservation ()
 
NAVIGATIONSYSTEM_API void SetSourceActor (const AActor &InSourceActor)
 
const AActorGetSourceActor () const
 
const INavAgentInterfaceGetSourceActorAsNavAgent () const
 
FVector GetLastRepathGoalLocation () const
 
NAVIGATIONSYSTEM_API void UpdateLastRepathGoalLocation ()
 
double GetLastUpdateTime () const
 
float GetGoalActorTetherDistance () const
 
void EnableRecalculationOnInvalidation (bool bShouldAutoUpdate)
 
bool WillRecalculateOnInvalidation () const
 
void SetIgnoreInvalidation (bool bShouldIgnore)
 
bool GetIgnoreInvalidation () const
 
NAVIGATIONSYSTEM_API EPathObservationResult::Type TickPathObservation ()
 
NAVIGATIONSYSTEM_API FVector GetGoalLocation () const
 
NAVIGATIONSYSTEM_API FVector GetPathFindingStartLocation () const
 
const AActorGetGoalActor () const
 
const INavAgentInterfaceGetGoalActorAsNavAgent () const
 
- Public Member Functions inherited from TSharedFromThis< FNavigationPath, ESPMode::ThreadSafe >
TSharedRef< FNavigationPath, Mode > AsShared ()
 
TSharedRef< FNavigationPath const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FNavigationPath, Mode > AsWeak ()
 
TWeakPtr< FNavigationPath const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Static Public Attributes

static AIMODULE_API const FNavPathType Type
 
- Static Public Attributes inherited from FNavMeshPath
static NAVIGATIONSYSTEM_API const FNavPathType Type
 

Protected Member Functions

AIMODULE_API bool MoveToNextSection (const FVector &AgentLocation)
 
- Protected Member Functions inherited from FNavMeshPath
NAVIGATIONSYSTEM_API FVector::FReal GetStringPulledLength (const int32 StartingPoint) const
 
NAVIGATIONSYSTEM_API FVector::FReal GetPathCorridorLength (const int32 StartingEdge) const
 
NAVIGATIONSYSTEM_API const TArray< FNavigationPortalEdge > & GeneratePathCorridorEdges () const
 
- Protected Member Functions inherited from FNavigationPath
virtual void OnPathUpdated (ENavPathUpdateType::Type UpdateType)
 
- Protected Member Functions inherited from TSharedFromThis< FNavigationPath, ESPMode::ThreadSafe >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 

Protected Attributes

TArray< FMetaPathWayPointWaypoints
 
FVector::FReal ApproximateLength
 
float WaypointSwitchRadius
 
int32 TargetWaypointIdx
 
TWeakObjectPtr< AActorPathGoal
 
float PathGoalTetherDistance
 
- Protected Attributes inherited from FNavMeshPath
uint32 bStringPulled: 1
 
uint32 bWantsStringPulling: 1
 
uint32 bWantsPathCorridor: 1
 
- Protected Attributes inherited from FNavigationPath
TArray< FNavPathPointPathPoints
 
TWeakObjectPtr< AActorBase
 
FSharedConstNavQueryFilter Filter
 
FNavPathType PathType
 
FPathObserverDelegate ObserverDelegate
 
uint32 bUpToDate: 1
 
uint32 bIsReady: 1
 
uint32 bIsPartial: 1
 
uint32 bReachedSearchLimit: 1
 
uint32 bErrorStartLocationNonNavigable: 1 = false
 
uint32 bErrorEndLocationNonNavigable: 1 = false
 
uint32 bDoAutoUpdateOnInvalidation: 1
 
uint32 bIgnoreInvalidation: 1
 
uint32 bUpdateStartPointOnRepath: 1
 
uint32 bUpdateEndPointOnRepath: 1
 
uint32 bWaitingForRepath: 1
 
uint32 bUseOnPathUpdatedNotify: 1
 
uint32 bObservingGoalActor: 1
 
TWeakObjectPtr< ANavigationDataNavigationDataUsed
 
FPathFindingQueryData PathFindingQueryData
 
double LastUpdateTimeStamp
 

Additional Inherited Members

- Static Public Member Functions inherited from FNavigationPath
static bool GetPathPoint (const FNavigationPath *Path, uint32 PathVertIdx, FNavPathPoint &PathPoint)
 
- Public Attributes inherited from FNavMeshPath
TArray< NavNodeRefPathCorridor
 
TArray< FVector::FRealPathCorridorCost
 
TArray< uint32CustomLinkIds
 
TArray< FNavLinkIdCustomNavLinkIds
 
uint32 bDynamic: 1
 
- Public Attributes inherited from FNavigationPath
TArray< NavNodeRefShortcutNodeRefs
 
- Static Protected Member Functions inherited from TSharedFromThis< FNavigationPath, ESPMode::ThreadSafe >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 
- Static Protected Attributes inherited from FNavigationPath
static NAVIGATIONSYSTEM_API const FNavPathType Type
 

Detailed Description

FMetaNavMeshPath allows creating hierarchical or guided navmesh paths

Waypoints array defines list of locations that will be used to create actual FNavMeshPath data during path following. On path following start and upon reaching waypoint, path will request update from owning navmesh with following parameters:

  • start location set to agent location
  • end location set to target waypoint (or goal actor for last one)
  • goal actor set only for last section

Since path updates itself for moving agent it really shouldn't be reused by others.

Member Typedef Documentation

◆ Super

Constructor & Destructor Documentation

◆ FMetaNavMeshPath() [1/5]

FMetaNavMeshPath::FMetaNavMeshPath ( )

◆ FMetaNavMeshPath() [2/5]

FMetaNavMeshPath::FMetaNavMeshPath ( const TArray< FMetaPathWayPoint > &  InWaypoints,
const ANavigationData NavData 
)

◆ FMetaNavMeshPath() [3/5]

FMetaNavMeshPath::FMetaNavMeshPath ( const TArray< FMetaPathWayPoint > &  InWaypoints,
const AController Owner 
)

◆ FMetaNavMeshPath() [4/5]

FMetaNavMeshPath::FMetaNavMeshPath ( const TArray< FVector > &  InWaypoints,
const ANavigationData NavData 
)

◆ FMetaNavMeshPath() [5/5]

FMetaNavMeshPath::FMetaNavMeshPath ( const TArray< FVector > &  InWaypoints,
const AController Owner 
)

Member Function Documentation

◆ ConditionalMoveToNextSection()

bool FMetaNavMeshPath::ConditionalMoveToNextSection ( const FVector AgentLocation,
EMetaPathUpdateReason  Reason 
)
virtual

try switching to next waypoint, depends on WaypointSwitchRadius

◆ CopyFrom()

void FMetaNavMeshPath::CopyFrom ( const FMetaNavMeshPath Other)
virtual

copy properties of other meta path

◆ DebugDraw()

void FMetaNavMeshPath::DebugDraw ( const ANavigationData NavData,
const FColor  PathColor,
UCanvas Canvas,
const bool  bPersistent,
const float  LifeTime,
const uint32  NextPathPointIndex = 0 
) const
overridevirtual

Reimplemented from FNavMeshPath.

◆ ForceMoveToNextSection()

bool FMetaNavMeshPath::ForceMoveToNextSection ( const FVector AgentLocation)

force switching to next waypoint

◆ GetCostFromIndex()

FVector::FReal FMetaNavMeshPath::GetCostFromIndex ( int32  PathPointIndex) const
overridevirtual

returns approximate cost of path, ignores parameter

Reimplemented from FNavMeshPath.

◆ GetLengthFromPosition()

FVector::FReal FMetaNavMeshPath::GetLengthFromPosition ( FVector  SegmentStart,
uint32  NextPathPointIndex 
) const
overridevirtual

returns approximate length of path, ignores parameters

Reimplemented from FNavigationPath.

◆ GetMetaPathGoal()

AActor * FMetaNavMeshPath::GetMetaPathGoal ( ) const
inline

returns cached path goal

◆ GetNumWaypoints()

int32 FMetaNavMeshPath::GetNumWaypoints ( ) const
inline

returns number of waypoints

◆ GetTargetWaypointIndex()

int32 FMetaNavMeshPath::GetTargetWaypointIndex ( ) const
inline

returns index of current target waypoint

◆ GetWaypointArray()

const TArray< FMetaPathWayPoint > & FMetaNavMeshPath::GetWaypointArray ( ) const
inline

returns waypoint array

◆ GetWaypointSwitchRadius()

float FMetaNavMeshPath::GetWaypointSwitchRadius ( ) const
inline

returns radius for switching to next waypoint during path following

◆ Initialize()

void FMetaNavMeshPath::Initialize ( const FVector AgentLocation)
virtual

initialize path for path following

◆ IsLastSection()

bool FMetaNavMeshPath::IsLastSection ( ) const
inline

returns true if path at last waypoint

◆ MoveToNextSection()

bool FMetaNavMeshPath::MoveToNextSection ( const FVector AgentLocation)
protected

switch to next waypoint

◆ SetWaypoints() [1/2]

bool FMetaNavMeshPath::SetWaypoints ( const TArray< FMetaPathWayPoint > &  InWaypoints)

tries to set waypoints, fails when path is ready being followed

◆ SetWaypoints() [2/2]

bool FMetaNavMeshPath::SetWaypoints ( const TArray< FVector > &  InWaypoints)

tries to set waypoints, fails when path is ready being followed

◆ SetWaypointSwitchRadius()

void FMetaNavMeshPath::SetWaypointSwitchRadius ( float  InSwitchRadius)
inline

sets radius for switching to next waypoint during path following

◆ UpdatePath()

bool FMetaNavMeshPath::UpdatePath ( const FVector AgentLocation)
virtual

updates underlying navmesh path for current target waypoint

Member Data Documentation

◆ ApproximateLength

FVector::FReal FMetaNavMeshPath::ApproximateLength
protected

sum of 3D distance along waypoints, used for approximating length of path

◆ PathGoal

TWeakObjectPtr<AActor> FMetaNavMeshPath::PathGoal
protected

stored goal actor

◆ PathGoalTetherDistance

float FMetaNavMeshPath::PathGoalTetherDistance
protected

stored goal actor's tether distance

◆ TargetWaypointIdx

int32 FMetaNavMeshPath::TargetWaypointIdx
protected

current target of path following

◆ Type

AIMODULE_API const FNavPathType FMetaNavMeshPath::Type
static

◆ Waypoints

TArray<FMetaPathWayPoint> FMetaNavMeshPath::Waypoints
protected

list of waypoints, including start and end of path

◆ WaypointSwitchRadius

float FMetaNavMeshPath::WaypointSwitchRadius
protected

update navmesh path when this close to target waypoint


The documentation for this struct was generated from the following files: