Navigation
API > API/Runtime > API/Runtime/AIModule > API/Runtime/AIModule/Navigation
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UNavLocalGridManager
References
| Module | AIModule |
| Header | /Engine/Source/Runtime/AIModule/Classes/Navigation/NavLocalGridManager.h |
| Include | #include "Navigation/NavLocalGridManager.h" |
Syntax
class UNavLocalGridManager : public UObject
Remarks
Manager for local navigation grids
Builds non overlapping grid from multiple sources, that can be used later for pathfinding. Check also: UGridPathFollowingComponent, FNavLocalGridData
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint32: 1 | bNeedsRebuilds | ||
| TArray< FCombinedNavGridData > | CombinedGrids | ||
| int32 | MaxActiveSourceGrids | ||
| int32 | NextGridId | ||
| TArray< FNavLocalGridData > | SourceGrids | ||
| int32 | VersionNum |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UNavLocalGridManager
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | AddGridData
(
const FNavLocalGridData& GridData, |
Adds new grid | |
| int32 | AddLocalNavigationGridForBox
(
UObject* WorldContextObject, |
||
| int32 | AddLocalNavigationGridForCapsule
(
UObject* WorldContextObject, |
||
| int32 | AddLocalNavigationGridForPoint
(
UObject* WorldContextObject, |
Creates new grid data for single point | |
| int32 | AddLocalNavigationGridForPoints
(
UObject* WorldContextObject, |
Creates single grid data for set of points | |
| bool | FindLocalNavigationGridPath
(
UObject* WorldContextObject, |
||
| bool | Tries to find a path using grids, returns false when start and end locations are not on the same grid | ||
| float | GetCellSize () |
Get shared size of grid cell, static but there's only one active manager | |
| UNavLocalGridManager * | GetCurrent
(
UWorld* World |
||
| UNavLocalGridManager * | GetCurrent
(
const UObject* WorldContextObject |
||
| const FNavLocalGridData & | GetGridData
(
int32 GridIdx |
Get combined, non overlapping grid by index | |
| int32 | GetGridIndex
(
const FVector& WorldLocation |
Find combined grid at location | |
| uint8 | GetGridValueAt
(
const FVector& WorldLocation |
Find combined grid value at world location | |
| int32 | Get limit of source grids | ||
| int32 | GetNumGrids () |
Get number of combined, non overlapping grids | |
| int32 | Get number of known source grids | ||
| const FNavLocalGridData & | GetSourceData
(
int32 SourceIdx |
Get source grid by index | |
| int32 | GetVersion () |
Get version of grid data, incremented with each rebuild | |
| bool | Check if source grid limit is set | ||
| void | ProjectGrids
(
const TArray< int32 >& GridIndices |
Projects combined grids to navigation data | |
| void | RebuildGrids () |
Rebuild overlapping grids if needed | |
| void | RemoveGridData
(
int32 GridId, |
Removes grid | |
| void | RemoveLocalNavigationGrid
(
UObject* WorldContextObject, |
||
| bool | SetCellSize
(
float CellSize |
Set shared size of grid cell, allowed only when there's no grid added | |
| bool | SetLocalNavigationGridDensity
(
UObject* WorldContextObject, |
||
| void | SetMaxActiveSources
(
int32 NumActiveSources |
Set limit of source grids, 0 or negative means unlimited | |
| void | UpdateAccessTime
(
int32 CombinedGridIdx |
Updates LastAccessTime in all source grids | |
| bool | Ensures limit of source grids, removing oldest entries (LastAccessTime) |
Constants
| Name | Description |
|---|---|
| GridCellSize |