Navigation
Unreal Engine C++ API Reference > Runtime > NavigationSystem
Inheritance Hierarchy
- TSharedFromThis
- FNavigationPath
- FAbstractNavigationPath
- FNavMeshPath
- FMetaNavMeshPath
References
Module | NavigationSystem |
Header | /Engine/Source/Runtime/NavigationSystem/Public/NavigationData.h |
Include | #include "NavigationData.h" |
Syntax
struct FNavigationPath : public TSharedFromThis< FNavigationPath, ESPMode::ThreadSafe >
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TWeakObjectPtr< AActor > | Base | Base actor, if exist path points locations will be relative to it |
![]() |
uint32: 1 | bDoAutoUpdateOnInvalidation | If true path will request re-pathing if it gets invalidated due to underlying navigation changed |
![]() |
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) |
![]() |
uint32: 1 | bIsPartial | "true" when path is only partially generated, when goal is unreachable and path represent best guess |
![]() |
uint32: 1 | bIsReady | When false it means path instance has been created, but not filled with data yet |
![]() |
uint32: 1 | bObservingGoalActor | Indicates whether at any point GoalActor was a valid Actor. |
![]() |
uint32: 1 | bReachedSearchLimit | Set to true when path finding algorithm reached a technical limit (like limit of A* nodes). |
![]() |
uint32: 1 | bUpdateEndPointOnRepath | If true path will use GetGoalLocation() for updating QueryData before repath |
![]() |
uint32: 1 | bUpdateStartPointOnRepath | If true path will use GetPathFindingStartLocation() for updating QueryData before repath |
![]() |
uint32: 1 | bUpToDate | "true" until navigation data used to generate this path has been changed/invalidated |
![]() |
uint32: 1 | bUseOnPathUpdatedNotify | If true path will call OnPathUpdated notify |
![]() |
uint32: 1 | bWaitingForRepath | Set when path is waiting for recalc from navigation data |
![]() |
FSharedConstNavQueryFilter | Filter | DEPRECATED: filter used to build this path. |
![]() |
double | LastUpdateTimeStamp | Gets set during path creation and on subsequent path's updates |
![]() |
TWeakObjectPtr< ANavigationData > | NavigationDataUsed | Navigation data used to generate this path |
![]() |
FPathObserverDelegate | ObserverDelegate | A delegate that will be called when path becomes invalid |
![]() |
FPathFindingQueryData | PathFindingQueryData | Essential part of query used to generate this path |
![]() |
TArray< FNavPathPoint > | 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 |
![]() |
FNavPathType | PathType | |
![]() |
TArray< NavNodeRef > | ShortcutNodeRefs | Additional node refs used during path following shortcuts |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
|||
![]() |
PRAGMA_DISABLE_DEPRECATION_WARNINGS | FNavigationPath
(
const FNavigationPath& |
|
![]() |
FNavigationPath
(
const TArray< FVector >& Points, |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
FDelegateHandle | AddObserver
(
FPathObserverDelegate::FDelegate NewObserver |
|
![]() |
PathClass * | CastPath () |
|
![]() ![]() |
const PathClass * | CastPath () |
Type safe casts |
![]() ![]() ![]() |
bool | Check if path contains any custom nav link | |
![]() ![]() ![]() |
bool | ContainsCustomLink
(
FNavLinkId UniqueLinkId |
|
![]() ![]() ![]() |
bool | ContainsNode
(
NavNodeRef NodeRef |
Check if path contains given node |
![]() ![]() ![]() |
void | DescribeSelfToVisLog
(
FVisualLogEntry* Snapshot |
|
![]() ![]() |
bool | ||
![]() |
void | Turns goal actor location's observation | |
![]() ![]() ![]() |
bool | DoesIntersectBox
(
const FBox& Box, |
Checks if given path, starting from StartingIndex, intersects with given AABB box. |
![]() ![]() ![]() |
bool | DoesIntersectBox
(
const FBox& Box, |
Checks if given path, starting from StartingIndex, intersects with given AABB box |
![]() |
void | DoneUpdating
(
ENavPathUpdateType::Type UpdateType |
|
![]() |
void | EnableRecalculationOnInvalidation
(
bool bShouldAutoUpdate |
If enabled path will request recalculation if it gets invalidated due to a change to underlying navigation |
![]() ![]() |
AActor * | GetBaseActor () |
|
![]() ![]() |
FVector::FReal | GetCost () |
|
![]() ![]() ![]() |
FVector::FReal | GetCostFromIndex
(
int32 PathPointIndex |
Get cost of path, starting from given point |
![]() ![]() ![]() |
FVector::FReal | GetCostFromNode
(
NavNodeRef PathNode |
Get cost of path, starting from given node |
![]() ![]() ![]() |
FString | ||
![]() ![]() |
FVector | ||
![]() ![]() |
FVector | ||
![]() ![]() |
FSharedConstNavQueryFilter | GetFilter () |
|
![]() ![]() |
const AActor * | GetGoalActor () |
|
![]() ![]() |
const INavAgentInterface * | ||
![]() ![]() |
float | ||
![]() ![]() |
FVector | If GoalActor is set it retrieved its navigation location, if not retrieved last path point location | |
![]() ![]() |
bool | ||
![]() ![]() |
FVector | ||
![]() ![]() |
double | ||
![]() ![]() |
FVector::FReal | GetLength () |
|
![]() ![]() ![]() |
FVector::FReal | GetLengthFromPosition
(
FVector SegmentStart, |
Calculates total length of segments from NextPathPoint to the end of path, plus distance from CurrentPosition to NextPathPoint |
![]() ![]() |
ANavigationData * | ||
![]() |
FPathObserverDelegate & | GetObserver () |
|
![]() ![]() |
FVector | Retrieved location to start path finding from (in case of path recalculation) | |
![]() ![]() |
bool | GetPathPoint
(
const FNavigationPath* Path, |
|
![]() ![]() |
FBasedPosition | GetPathPointLocation
(
uint32 Index |
Get based position of path point |
![]() |
TArray< FNavPathPoint > & | ||
![]() ![]() |
const TArray< FNavPathPoint > & | ||
![]() ![]() |
const UObject * | GetQuerier () |
|
![]() ![]() |
FPathFindingQueryData | GetQueryData () |
|
![]() ![]() ![]() |
FVector | GetSegmentDirection
(
uint32 SegmentEndIndex |
Retrieves normalized direction vector to given path segment for '0'-th segment returns same as for 1st segment |
![]() ![]() |
const AActor * | ||
![]() ![]() |
const INavAgentInterface * | ||
![]() ![]() |
FVector | ||
![]() ![]() |
double | GetTimeStamp () |
|
![]() |
void | Invalidate () |
|
![]() ![]() |
bool | IsPartial () |
|
![]() ![]() |
bool | IsReady () |
|
![]() ![]() |
bool | IsUpToDate () |
|
![]() ![]() |
bool | IsValid () |
|
![]() ![]() |
bool | ||
![]() |
void | MarkReady () |
|
![]() ![]() |
void | OnPathUpdated
(
ENavPathUpdateType::Type UpdateType |
Optional notify called when path finishes update, before broadcasting to observes - requires bUseOnPathUpdatedNotify flag set |
![]() |
void | RemoveObserver
(
FDelegateHandle HandleOfObserverToRemove |
|
![]() |
void | RePathFailed () |
|
![]() ![]() |
void | Resets all variables describing generated path before attempting new pathfinding call. | |
![]() |
void | SetFilter
(
FSharedConstNavQueryFilter InFilter |
|
![]() |
void | SetGoalActorObservation
(
const AActor& ActorToObserve, |
Enables path observing specified AActor's location and update itself if actor changes location |
![]() |
void | SetGoalActorTetherDistance
(
const float NewTetherDistace |
Modifies distance to the GoalActor at which we'll update the path |
![]() |
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!) |
![]() |
void | SetIsPartial
(
const bool bPartial |
FORCEINLINE void SetObserver(const FPathObserverDelegate& Observer) { ObserverDelegate = Observer; }. |
![]() |
void | SetManualRepathWaiting
(
const bool bInWaitingForRepath |
|
![]() |
void | SetNavigationDataUsed
(
const ANavigationData*const NewData |
|
![]() |
void | SetQuerier
(
const UObject* InQuerier |
|
![]() |
void | SetQueryData
(
const FPathFindingQueryData& QueryData |
|
![]() |
void | SetSearchReachedLimit
(
const bool bLimited |
|
![]() |
void | SetSourceActor
(
const AActor& InSourceActor |
Set's up the path to use SourceActor's location in case of recalculation |
![]() |
void | SetTimeStamp
(
double TimeStamp |
|
![]() ![]() |
bool | ||
![]() ![]() |
bool | ||
![]() |
EPathObservationResult::Type | ||
![]() |
void | ||
![]() ![]() |
bool |
Operators
Type | Name | Description | |
---|---|---|---|
![]() |
FNavigationPath & | operator=
(
const FNavigationPath& Other |
Typedefs
Name | Description |
---|---|
FPathObserverDelegate | DECLARE_DELEGATE_OneParam(FPathObserverDelegate, FNavigationPath*);. |
Constants
Name | Description |
---|---|
Type | Type of path |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
bool | ContainsCustomLink
(
uint32 UniqueLinkId |
Use version that takes FNavLinkId instead. This function only returns false. |
![]() ![]() ![]() |
void | DebugDraw
(
const ANavigationData* NavData, |
Use version that takes LifeTime instead. |
![]() ![]() ![]() |
void | DebugDraw
(
const ANavigationData* NavData, |
Use version that takes LifeTime instead. |