FNavigationPath

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

NavigationSystem

Header

/Engine/Source/Runtime/NavigationSystem/Public/NavigationData.h

Include

#include "NavigationData.h"

Syntax

Variables

Name Description

Protected variable

TWeakObjectPtr<...

 

Base

Base actor, if exist path points locations will be relative to it

Protected variable

uint32: 1

 

bDoAutoUpdateOnInvalidation

If true path will request re-pathing if it gets invalidated due to underlying navigation changed

Protected variable

uint32: 1

 

bIgnoreInvalidation

If true path will keep bUpToDate value after getting invalidated due to underlying navigation changed (observer and auto repath will NOT be triggered!) it's NOT safe to use if path relies on navigation data references (e.g. poly corridor)

Protected variable

uint32: 1

 

bIsPartial

"true" when path is only partially generated, when goal is unreachable and path represent best guess

Protected variable

uint32: 1

 

bIsReady

When false it means path instance has been created, but not filled with data yet

Protected variable

uint32: 1

 

bObservingGoalActor

Indicates whether at any point GoalActor was a valid Actor.

Protected variable

uint32: 1

 

bReachedSearchLimit

Set to true when path finding algorithm reached a technical limit (like limit of A* nodes).

Protected variable

uint32: 1

 

bUpdateEndPointOnRepath

If true path will use GetGoalLocation() for updating QueryData before repath

Protected variable

uint32: 1

 

bUpdateStartPointOnRepath

If true path will use GetPathFindingStartLocation() for updating QueryData before repath

Protected variable

uint32: 1

 

bUpToDate

"true" until navigation data used to generate this path has been changed/invalidated

Protected variable

uint32: 1

 

bUseOnPathUpdatedNotify

If true path will call OnPathUpdated notify

Protected variable

uint32: 1

 

bWaitingForRepath

Set when path is waiting for recalc from navigation data

Protected variable

FSharedConstNav...

 

Filter

DEPRECATED: filter used to build this path.

Protected variable

float

 

LastUpdateTimeStamp

Gets set during path creation and on subsequent path's updates

Protected variable

TWeakObjectPtr<...

 

NavigationDataUsed

Navigation data used to generate this path

Protected variable

FPathObserverDe...

 

ObserverDelegate

A delegate that will be called when path becomes invalid

Protected variable

FPathFindingQue...

 

PathFindingQueryData

Essential part of query used to generate this path

Protected variable

TArray< FNavPat...

 

PathPoints

IMPORTANT: path is assumed to be valid if it contains MORE than ONE point point 0 is path's starting point - if it's the only point on the path then there's no path per se

Protected variable

FNavPathType

 

PathType

Public variable

TArray< NavNode...

 

ShortcutNodeRefs

Additional node refs used during path following shortcuts

Constructors

Name Description

Public function

FNavigationPath()

Public function

FNavigationPath

(
    const TArray< FVector >& Points,
    AActor* Base
)

Destructors

Name Description

Public function Virtual

~FNavigationPath()

Functions

Name Description

Public function

FDelegateHan...

 

AddObserver

(
    FPathObserverDelegate::FDelegate Ne...
)

Public function

PathClass &#...

 

CastPath()

Public function Const

const PathCl...

 

CastPath()

Type safe casts

Public function Virtual Const

bool

 

ContainsAnyCustomLink()

Check if path contains any custom nav link

Public function Virtual Const

bool

 

ContainsCustomLink

(
    uint32 UniqueLinkId
)

Check if path contains specific custom nav link

Public function Virtual Const

bool

 

ContainsNode

(
    NavNodeRef NodeRef
)

Check if path contains given node

Public function Virtual Const

void

 

DebugDraw

(
    const ANavigationData* NavData,
    FColor PathColor,
    UCanvas* Canvas,
    bool bPersistent,
    const uint32 NextPathPointIndex
)

Public function Virtual Const

void

 

DescribeSelfToVisLog

(
    FVisualLogEntry* Snapshot
)

Public function Const

bool

 

DidSearchReachedLimit()

Public function

void

 

DisableGoalActorObservation()

Turns goal actor location's observation

Public function Virtual Const

bool

 

DoesIntersectBox

(
    const FBox& Box,
    const FVector& AgentLocation,
    uint32 StartingIndex,
    int32* IntersectingSegmentInde...,
    FVector* AgentExtent
)

Checks if given path, starting from StartingIndex, intersects with given AABB box.

Public function Virtual Const

bool

 

DoesIntersectBox

(
    const FBox& Box,
    uint32 StartingIndex,
    int32* IntersectingSegmentInde...,
    FVector* AgentExtent
)

Checks if given path, starting from StartingIndex, intersects with given AABB box

Public function

void

 

DoneUpdating

(
    ENavPathUpdateType::Type UpdateType
)

Public function

void

 

EnableRecalculationOnInvalidation

(
    bool bShouldAutoUpdate
)

If enabled path will request recalculation if it gets invalidated due to a change to underlying navigation

Public function Const

AActor *

 

GetBaseActor()

Public function Const

float

 

GetCost()

Public function Virtual Const

float

 

GetCostFromIndex

(
    int32 PathPointIndex
)

Get cost of path, starting from given point

Public function Virtual Const

float

 

GetCostFromNode

(
    NavNodeRef PathNode
)

Get cost of path, starting from given node

Public function Virtual Const

FString

 

GetDescription()

Public function Const

FVector

 

GetDestinationLocation()

Public function Const

FVector

 

GetEndLocation()

Public function Const

FSharedConst...

 

GetFilter()

Public function Const

const AActor...

 

GetGoalActor()

Public function Const

const INavAg...

 

GetGoalActorAsNavAgent()

Public function Const

float

 

GetGoalActorTetherDistance()

Public function Const

FVector

 

GetGoalLocation()

If GoalActor is set it retrieved its navigation location, if not retrieved last path point location

Public function Const

bool

 

GetIgnoreInvalidation()

Public function Const

FVector

 

GetLastRepathGoalLocation()

Public function Const

float

 

GetLastUpdateTime()

Public function Const

float

 

GetLength()

Public function Virtual Const

float

 

GetLengthFromPosition

(
    FVector SegmentStart,
    uint32 NextPathPointIndex
)

Calculates total length of segments from NextPathPoint to the end of path, plus distance from CurrentPosition to NextPathPoint

Public function Const

ANavigationD...

 

GetNavigationDataUsed()

Public function

FPathObserve...

 

GetObserver()

Public function Const

FVector

 

GetPathFindingStartLocation()

Retrieved location to start path finding from (in case of path recalculation)

Public function Static

bool

 

GetPathPoint

(
    const FNavigationPath* Path,
    uint32 PathVertIdx,
    FNavPathPoint& PathPoint
)

Public function Const

FBasedPositi...

 

GetPathPointLocation

(
    uint32 Index
)

Get based position of path point

Public function

TArray< FNav...

 

GetPathPoints()

Public function Const

const TArray...

 

GetPathPoints()

Public function Const

const UObjec...

 

GetQuerier()

Public function Const

FPathFinding...

 

GetQueryData()

Public function Virtual Const

FVector

 

GetSegmentDirection

(
    uint32 SegmentEndIndex
)

Retrieves normalized direction vector to given path segment for '0'-th segment returns same as for 1st segment

Public function Const

const AActor...

 

GetSourceActor()

Public function Const

const INavAg...

 

GetSourceActorAsNavAgent()

Public function Const

FVector

 

GetStartLocation()

Public function Const

float

 

GetTimeStamp()

Public function

void

 

Invalidate()

Public function Const

bool

 

IsPartial()

Public function Const

bool

 

IsReady()

Public function Const

bool

 

IsUpToDate()

Public function Const

bool

 

IsValid()

Public function Const

bool

 

IsWaitingForRepath()

Public function

void

 

MarkReady()

Protected function Virtual

void

 

OnPathUpdated

(
    ENavPathUpdateType::Type UpdateType
)

Optional notify called when path finishes update, before broadcasting to observes - requires bUseOnPathUpdatedNotify flag set

Public function

void

 

RemoveObserver

(
    FDelegateHandle HandleOfObserverToR...
)

Public function

void

 

RePathFailed()

Public function Virtual

void

 

ResetForRepath()

Resets all variables describing generated path before attempting new pathfinding call.

Public function

void

 

SetFilter

(
    FSharedConstNavQueryFilter InFilter
)

Public function

void

 

SetGoalActorObservation

(
    const AActor& ActorToObserve,
    float TetherDistance
)

Enables path observing specified AActor's location and update itself if actor changes location

Public function

void

 

SetGoalActorTetherDistance

(
    const float NewTetherDistace
)

Modifies distance to the GoalActor at which we'll update the path

Public function

void

 

SetIgnoreInvalidation

(
    bool bShouldIgnore
)

If ignoring, path will stay bUpToDate after being invalidated due to a change to underlying navigation (observer and auto repath will NOT be triggered!)

Public function

void

 

SetIsPartial

(
    const bool bPartial
)

FORCEINLINE void SetObserver(const FPathObserverDelegate& Observer) { ObserverDelegate = Observer; }.

Public function

void

 

SetManualRepathWaiting

(
    const bool bInWaitingForRepath
)

Public function

void

 

SetNavigationDataUsed

(
    const ANavigationData*const Ne...
)

Public function

void

 

SetQuerier

(
    const UObject* InQuerier
)

Public function

void

 

SetQueryData

(
    const FPathFindingQueryData& Query...
)

Public function

void

 

SetSearchReachedLimit

(
    const bool bLimited
)

Public function

void

 

SetSourceActor

(
    const AActor& InSourceActor
)

Set's up the path to use SourceActor's location in case of recalculation

Public function

void

 

SetTimeStamp

(
    float TimeStamp
)

Public function Const

bool

 

ShouldUpdateEndPointOnRepath()

Public function Const

bool

 

ShouldUpdateStartPointOnRepath()

Public function

EPathObserva...

 

TickPathObservation()

Public function

void

 

UpdateLastRepathGoalLocation()

Public function Const

bool

 

WillRecalculateOnInvalidation()

Typedefs

Name

Description

FPathObserverDelegate

DECLARE_DELEGATE_OneParam(FPathObserverDelegate, FNavigationPath*);.

Constants

Name

Description

Type

Type 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