Navigation
API > API/Runtime > API/Runtime/AIModule > API/Runtime/AIModule/Navigation
Inheritance Hierarchy
- UCrowdManagerBase
- UCrowdManager
References
| Module | AIModule |
| Header | /Engine/Source/Runtime/AIModule/Classes/Navigation/CrowdManager.h |
| Include | #include "Navigation/CrowdManager.h" |
Syntax
UCLASS (Config=Engine, defaultconfig, MinimalAPI)
class UCrowdManager : public UCrowdManagerBase
Variables
| Type | Name | Description | |
|---|---|---|---|
| TMap< ICrowdAgentInterface *, FCrowdAgentData > | ActiveAgents | Agents registered in crowd manager | |
| TArray< uint8 > | AgentFlags | Temporary flags for crowd agents | |
| TArray< FCrowdAvoidanceConfig > | AvoidanceConfig | Obstacle avoidance params | |
| uint32: 1 | bAllowPathReplan | ||
| uint32: 1 | bEarlyReachTestOptimization | ||
| uint32: 1 | bPruneStartedOffmeshConnections | ||
| uint32: 1 | bResolveCollisions | Should crowd simulation resolve collisions between agents? if not, this will be handled by their movement components | |
| uint32: 1 | bSingleAreaVisibilityOptimization | ||
| float | MaxAgentRadius | Max radius of agent that can be added to crowd | |
| int32 | MaxAgents | Max number of agents supported by crowd | |
| int32 | MaxAvoidedAgents | Max number of neighbor agents for velocity avoidance | |
| int32 | MaxAvoidedWalls | Max number of wall segments for velocity avoidance | |
| TObjectPtr< ANavigationData > | MyNavData | ||
| float | NavmeshCheckInterval | How often should agents check their position after moving off navmesh? | |
| float | PathOffsetRadiusMultiplier | Agent radius multiplier for offsetting path around corners | |
| float | PathOptimizationInterval | How often should agents try to optimize their paths? | |
| TArray< FCrowdAvoidanceSamplingPattern > | SamplingPatterns | Obstacle avoidance params | |
| float | SeparationDirClamp | Clamp separation force to left/right when neighbor is behind (dot between forward and dirToNei, -1 = disabled) | |
| FCrowdTickHelper * | TickHelper |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UCrowdManager
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AdjustAgentPathStart
(
const UCrowdFollowingComponent* AgentComponent, |
Adjust current position in path's corridor, starting test from PathStartIdx | |
| void | BeginDestroy () |
||
| void | CleanUp
(
float DeltaTime |
||
| void | ClearAgentMoveTarget
(
const UCrowdFollowingComponent* AgentComponent |
Clears move target for crowd agent (only for fully simulated) | |
| void | DebugTick () |
||
| bool | GetAvoidanceConfig
(
int32 Idx, |
Reads existing avoidance config or returns false | |
| UCrowdManager * | GetCurrent
(
UWorld* World |
||
| UCrowdManager * | GetCurrent
(
UObject* WorldContextObject |
||
| const ANavigationData * | GetNavData () |
||
| int32 | GetNearbyAgentLocations
(
const ICrowdAgentInterface* Agent, |
Returns a list of locations of nearby agents | |
| int32 | GetNumNearbyAgents
(
const ICrowdAgentInterface* Agent |
Returns number of nearby agents | |
| UWorld * | GetWorld () |
||
| bool | IsAgentValid
(
const UCrowdFollowingComponent* AgentComponent |
Check if object is a valid crowd agent | |
| bool | IsAgentValid
(
const ICrowdAgentInterface* Agent |
||
| bool | IsSuitableNavData
(
const ANavigationData& NavData |
Tests if NavData is a suitable nav data type to be used by this CrowdManager instance. | |
| void | OnAgentFinishedCustomLink
(
const ICrowdAgentInterface* Agent |
Update agent after using custom link | |
| void | OnNavDataRegistered
(
ANavigationData& NavData |
Called by the nav system when a new navigation data instance is registered. | |
| void | OnNavDataUnregistered
(
ANavigationData& NavData |
Called by the nav system when a navigation data instance is removed. | |
| void | Notify called when detour navmesh is changed | ||
| void | PauseAgent
(
const UCrowdFollowingComponent* AgentComponent |
Switch agent to waiting state | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
||
| void | Called from tick, after move points were updated, before any steering/avoidance | ||
| void | Called from tick, just after updating agents proximity data | ||
| void | RegisterAgent
(
ICrowdAgentInterface* Agent |
Adds new agent to crowd | |
| void | ResumeAgent
(
const UCrowdFollowingComponent* AgentComponent, |
Resumes agent movement | |
| bool | SetAgentMoveDirection
(
const UCrowdFollowingComponent* AgentComponent, |
Sets move direction for crowd agent (only for fully simulated) | |
| bool | SetAgentMovePath
(
const UCrowdFollowingComponent* AgentComponent, |
Sets move target using path (only for fully simulated) | |
| bool | SetAgentMoveTarget
(
const UCrowdFollowingComponent* AgentComponent, |
Sets move target for crowd agent (only for fully simulated) | |
| bool | SetAvoidanceConfig
(
int32 Idx, |
Updates existing avoidance config or returns false | |
| void | SetNavData
(
ANavigationData* NavData, |
Sets NavData as MyNavData. | |
| void | SetOffmeshConnectionPruning
(
bool bRemoveFromCorridor |
Remove started offmesh connections from corridor | |
| void | SetSingleAreaVisibilityOptimization
(
bool bEnable |
Block path visibility raycasts when crossing different nav areas | |
| void | Tick
(
float DeltaTime |
||
| void | UnregisterAgent
(
const ICrowdAgentInterface* Agent |
Removes agent from crowd | |
| void | UpdateAgentParams
(
const ICrowdAgentInterface* Agent |
Updates agent data | |
| void | UpdateAgentState
(
const ICrowdAgentInterface* Agent |
Refresh agent state | |
| void | Setup params of crowd avoidance | ||
| void | Try to initialize nav data from already existing ones |