FNavigationPath

Inheritance Hierarchy

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

 

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 PathCl...

 

CastPath()

Type safe casts

Public function Virtual

bool

 

ContainsAnyCustomLink()

Check if path contains any custom nav link

Public function Virtual

bool

 

ContainsCustomLink

(
    uint32 UniqueLinkId
)

ENABLE_VISUAL_LOG.

Public function Virtual

bool

 

ContainsNode

(
    NavNodeRef NodeRef
)

Check if path contains given node

Public function Virtual

void

 

DebugDraw

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

Public function Virtual

void

 

DescribeSelfToVisLog

(
    FVisualLogEntry * Snapshot
)

Public function

bool

 

DidSearchReachedLimit()

Public function

void

 

DisableGoalActorObservation()

Turns goal actor location's observation

Public function Virtual

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

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

AActor *

 

GetBaseActor()

Public function

float

 

GetCost()

Public function Virtual

float

 

GetCostFromIndex

(
    int32 PathPointIndex
)

Get cost of path, starting from given point

Public function Virtual

float

 

GetCostFromNode

(
    NavNodeRef PathNode
)

Get cost of path, starting from given node

Public function Virtual

FString

 

GetDescription()

Public function

FVector

 

GetDestinationLocation()

Public function

FVector

 

GetEndLocation()

Public function

FSharedConst ...

 

GetFilter()

Public function

const AActor ...

 

GetGoalActor()

Public function

const INavAg ...

 

GetGoalActorAsNavAgent()

Public function

float

 

GetGoalActorTetherDistance()

Public function

FVector

 

GetGoalLocation()

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

Public function

bool

 

GetIgnoreInvalidation()

Public function

FVector

 

GetLastRepathGoalLocation()

Public function

float

 

GetLastUpdateTime()

Public function

float

 

GetLength()

Public function Virtual

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

ANavigationD ...

 

GetNavigationDataUsed()

Public function

FPathObserve ...

 

GetObserver()

Public function

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

FBasedPositi ...

 

GetPathPointLocation

(
    uint32 Index
)

Get based position of path point

Public function

TArray < FNav ...

 

GetPathPoints()

Public function

const TArray ...

 

GetPathPoints()

Public function

const UObjec ...

 

GetQuerier()

Public function

FPathFinding ...

 

GetQueryData()

Public function Virtual

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 AActor ...

 

GetSourceActor()

Public function

const INavAg ...

 

GetSourceActorAsNavAgent()

Public function

FVector

 

GetStartLocation()

Public function

float

 

GetTimeStamp()

Public function

void

 

Invalidate()

Public function

bool

 

IsPartial()

Public function

bool

 

IsReady()

Public function

bool

 

IsUpToDate()

Public function

bool

 

IsValid()

Public function

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

 

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

bool

 

ShouldUpdateEndPointOnRepath()

Public function

bool

 

ShouldUpdateStartPointOnRepath()

Public function

EPathObserva ...

 

TickPathObservation()

Public function

void

 

UpdateLastRepathGoalLocation()

Public function

bool

 

WillRecalculateOnInvalidation()

Typedefs

Name

Description

FPathObserverDelegate

DECLARE_DELEGATE_OneParam(FPathObserverDelegate, FNavigationPath*);.

Constants

Name

Description

Type

Type of path

References

Module

Engine

Header

Runtime/Engine/Classes/AI/Navigation/NavigationData.h