UGridPathFollowingComponent

Path following augmented with local navigation grids

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/Navigation/GridPathFollowingComponent.h

Include

#include "Navigation/GridPathFollowingComponent.h"

Syntax

class UGridPathFollowingComponent : public UPathFollowingComponent

Remarks

Path following augmented with local navigation grids

Keeps track of nearby grids and use them instead of navigation path when agent is inside. Once outside grid, regular path following is resumed.

This allows creating dynamic navigation obstacles with fully static navigation (e.g. static navmesh), as long as they are minor modifications for path. Not recommended for blocking off entire corridors.

Does not replace proper avoidance for dynamic obstacles!

Variables

Name Description

Protected variable

int32

 

ActiveGridId

Id of current grid

Protected variable

int32

 

ActiveGridIdx

Index of current grid

Protected variable

uint32: 1

 

bHasGridPath

Set when grid path is valid

Protected variable

uint32: 1

 

bIsPathEndInsideGrid

Set when end of followed Path ends inside current grid

Protected variable

UNavLocalGridMa...

 

GridManager

Protected variable

int32

 

GridMoveSegmentEndIndex

Index of current destination grid path point

Protected variable

TArray< FVector...

 

GridPathPoints

Path points for moving through grid

Protected variable

int32

 

MoveSegmentStartIndexOffGrid

Expected start of path segment after leaving grid

Constructors

Name Description

Public function

UGridPathFollowingComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

int32

 

GetActiveGridIdx()

Public function Const

const TArray...

 

GetGridPathPoints()

Public function Const

int32

 

GetNextGridPathIndex()

Public function Const

bool

 

HasActiveGrid()

Protected function

void

 

UpdateActiveGrid

(
    const FVector& CurrentLocation
)

Overridden from UPathFollowingComponent

Name Description

Public function Virtual

void

 

Initialize()

Initialize component to use

Public function Virtual

void

 

OnPathUpdated()

Notify about changing current path: new pointer or update from path event

Public function Virtual

void

 

Reset()

Reset path following data

Public function Virtual

void

 

ResumeMove

(
    FAIRequestID RequestID
)

Resume path following

Public function Virtual

void

 

UpdatePathSegment()

Check state of path following, update move segment if needed

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss