Navigation
API > API/Runtime > API/Runtime/AIModule
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!
| Name | UGridPathFollowingComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/AIModule/Classes/Navigation/GridPathFollowingComponent.h |
| Include Path | #include "Navigation/GridPathFollowingComponent.h" |
Syntax
UCLASS (BlueprintType, Experimental, MinimalAPI)
class UGridPathFollowingComponent : public UPathFollowingComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UPathFollowingComponent → UGridPathFollowingComponent
Implements Interfaces
- IAIResourceInterface
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IPathFollowingAgentInterface
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UGridPathFollowingComponent
(
const FObjectInitializer& ObjectInitializer |
Navigation/GridPathFollowingComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 GetActiveGridIdx() |
Navigation/GridPathFollowingComponent.h | ||
const TArray< FVector > & GetGridPathPoints() |
Navigation/GridPathFollowingComponent.h | ||
int32 GetNextGridPathIndex() |
Navigation/GridPathFollowingComponent.h | ||
bool HasActiveGrid() |
Navigation/GridPathFollowingComponent.h |
Overridden from UPathFollowingComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Initialize() |
Initialize component to use | Navigation/GridPathFollowingComponent.h | |
virtual void OnPathUpdated() |
Notify about changing current path: new pointer or update from path event | Navigation/GridPathFollowingComponent.h | |
virtual void Reset() |
Reset path following data | Navigation/GridPathFollowingComponent.h | |
virtual void ResumeMove
(
FAIRequestID RequestID |
Resume path following | Navigation/GridPathFollowingComponent.h | |
virtual void UpdatePathSegment() |
Check state of path following, update move segment if needed | Navigation/GridPathFollowingComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void UpdateActiveGrid
(
const FVector& CurrentLocation |
Navigation/GridPathFollowingComponent.h |