Navigation
API > API/Runtime > API/Runtime/AIModule > API/Runtime/AIModule/Navigation
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- UPathFollowingComponent
- UGridPathFollowingComponent
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
| Type | Name | Description | |
|---|---|---|---|
| int32 | ActiveGridId | Id of current grid | |
| int32 | ActiveGridIdx | Index of current grid | |
| uint32: 1 | bHasGridPath | Set when grid path is valid | |
| uint32: 1 | bIsPathEndInsideGrid | Set when end of followed Path ends inside current grid | |
| TObjectPtr< UNavLocalGridManager > | GridManager | ||
| int32 | GridMoveSegmentEndIndex | Index of current destination grid path point | |
| TArray< FVector > | GridPathPoints | Path points for moving through grid | |
| int32 | MoveSegmentStartIndexOffGrid | Expected start of path segment after leaving grid |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UGridPathFollowingComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | |||
| const TArray< FVector > & | |||
| int32 | |||
| bool | |||
| void | UpdateActiveGrid
(
const FVector& CurrentLocation |
Overridden from UPathFollowingComponent
| Type | Name | Description | |
|---|---|---|---|
| void | Initialize () |
Initialize component to use | |
| void | Notify about changing current path: new pointer or update from path event | ||
| void | Reset () |
Reset path following data | |
| void | ResumeMove
(
FAIRequestID RequestID |
Resume path following | |
| void | Check state of path following, update move segment if needed |