AAIController
class AAIController :
public AController
,
public IAIPerceptionListenerInterface
,
public IGameplayTaskOwnerInterface
,
public IGenericTeamAgentInterface
,
public IVisualLoggerDebugSnapshotInterface
AIController is the base class of controllers for AI-controlled Pawns.
Controllers are non-physical actors that can be attached to a pawn to control its actions. AIControllers manage the artificial intelligence for the pawns they control. In networked games, they only exist on the server.
Name | Description | ||
---|---|---|---|
|
uint32 : 1 |
bAllowStrafe |
Is strafing allowed during movement? |
|
UBlackboardComp ... |
Blackboard |
Blackboard |
|
uint32 : 1 |
bLOSflag |
Used for alternating LineOfSight traces |
|
UBrainComponent ... |
BrainComponent |
Component responsible for behaviors. |
|
uint32 : 1 |
bSetControlRotationFromPawnOrientation |
Copy Pawn rotation to ControlRotation, if there is no focus point. |
|
uint32 : 1 |
bSkipExtraLOSChecks |
Skip extra line of sight traces to extremities of target being checked. |
|
uint32 : 1 |
bStopAILogicOnUnposses |
By default AI's logic gets stopped when controlled Pawn is unpossesed. |
|
uint32 : 1 |
bWantsPlayerState |
Specifies if this AI wants its own PlayerState. |
|
UGameplayTasksC ... |
CachedGameplayTasksComponent |
|
|
TSubclassOf < UN ... |
DefaultNavigationFilterClass |
|
|
FocusInformation |
||
|
UAIPerceptionCo ... |
PerceptionComponent |
|
|
FAIMoveComplete ... |
ReceiveMoveCompleted |
Blueprint notification that we've completed the current movement request |
Name | Description | |
---|---|---|
|
AAIController ( |
Name | Description | ||
---|---|---|---|
|
void |
ActorsPerceptionUpdated |
Notifies AIController of changes in given actors' perception |
|
bool |
AreAIIgnoringPlayers() |
|
|
bool |
BuildPathfindingQuery ( |
Helper function for creating pathfinding query for this agent from move request data |
|
void |
ClaimTaskResource ( |
|
|
void |
ClearFocus ( |
Clears Focus for given priority, will also clear FocalPoint as a result |
|
void |
FindPathForMoveRequest ( |
Finds path for given move request |
|
UPawnActions ... |
GetActionsComp() |
Returns ActionsComp subobject |
|
const UAIPer ... |
GetAIPerceptionComponent() |
|
|
UAIPerceptio ... |
GetAIPerceptionComponent() |
|
|
UBlackboardC ... |
GetBlackboardComponent() |
|
|
const UBlack ... |
GetBlackboardComponent() |
|
|
UBrainCompon ... |
GetBrainComponent() |
|
|
GetCurrentMoveRequestID() |
Returns the Move Request ID for the current move |
|
|
GetDebugIcon() |
-------------------------------------------------------------------// debug/dev-time -------------------------------------------------------------------// |
|
|
TSubclassOf <... |
GetDefaultNavigationFilterClass() |
|
|
GetFocalPoint() |
Retrieve the final position that controller should be looking at. |
|
|
GetFocalPointForPriority ( |
||
|
GetFocalPointOnActor ( |
Retrieve the focal point this controller should focus to on given actor. |
|
|
AActor * |
GetFocusActor() |
Get the focused actor. |
|
AActor * |
GetFocusActorForPriority ( |
|
|
UGameplayTas ... |
GetGameplayTasksComponent() |
|
|
GetImmediateMoveDestination() |
Returns position of current path segment's end. |
|
|
EPathFollowi ... |
GetMoveStatus() |
Returns status of path following |
|
UPathFollowi ... |
GetPathFollowingComponent() |
Returns PathFollowingComponent subobject |
|
bool |
HasPartialPath() |
Returns true if the current PathFollowingComponent's path is partial (does not reach desired destination). |
|
bool |
InitializeBlackboard ( |
|
|
void |
K2_ClearFocus() |
Clears Focus, will also clear FocalPoint as a result |
|
void |
K2_SetFocalPoint ( |
Set the position that controller should be looking at. |
|
void |
K2_SetFocus ( |
Set Focus for actor, will set FocalPoint as a result. |
|
bool |
LineOfSightTo |
Checks line to center and top of other actor true if controller's pawn can see Other actor. |
|
FPathFollowi ... |
MoveTo ( |
Makes AI go toward specified destination struct holding MoveId and enum code |
|
EPathFollowi ... |
MoveToActor ( |
Makes AI go toward specified Goal actor (destination will be continuously updated), aborts any active path following |
|
EPathFollowi ... |
MoveToLocation ( |
Makes AI go toward specified Dest location, aborts any active path following |
|
void |
OnGameplayTaskResourcesClaimed ( |
|
|
void |
OnMoveCompleted ( |
|
|
void |
OnMoveCompleted ( |
Called on completing current movement request |
|
void |
OnPossess ( |
Event called when PossessedPawn is possessed by this controller. |
|
void |
OnUnpossess ( |
Gets triggered after given pawn has been unpossesed |
|
void |
OnUsingBlackBoard ( |
|
|
bool |
PauseMove ( |
If AI is currently moving due to request given by RequestToPause, then the move will be paused |
|
bool |
PerformAction ( |
-------------------------------------------------------------------// Actions -------------------------------------------------------------------// |
|
bool |
PreparePathfinding ( |
DEPRECATED FUNCTION SUPPORT. |
|
RequestMove ( |
Passes move request and path object to path following |
|
|
RequestPathAndMove ( |
DEPRECATED FUNCTION SUPPORT. |
|
|
bool |
ResumeMove ( |
Resumes last AI-performed, paused request provided it's ID was equivalent to RequestToResume |
|
bool |
RunBehaviorTree ( |
Starts executing behavior tree. |
|
void |
SetFocalPoint ( |
ENABLE_VISUAL_LOG. |
|
void |
SetFocus ( |
Set Focus actor for given priority, will set FocalPoint as a result. |
|
void |
SetMoveBlockDetection ( |
Updates state of movement block detection. |
|
void |
SetPathFollowingComponent ( |
Note that his function does not do any pathfollowing state transfer. |
|
void |
SetPerceptionComponent ( |
|
|
bool |
ShouldSyncBlackboardWith ( |
Does this AIController allow given UBlackboardComponent sync data with it |
|
bool |
SuggestTossVelocity |
Computes a launch velocity vector to toss a projectile and hit the given destination. |
|
void |
ToggleAIIgnorePlayers() |
Cheat/debugging functions. |
|
void |
UnclaimTaskResource ( |
|
|
void |
UpdateControlRotation ( |
Update direction AI is looking based on FocalPoint |
|
bool |
UseBlackboard ( |
Makes AI use the specified Blackboard asset & creates a Blackboard Component if one does not already exist. |
Name | Description | ||
---|---|---|---|
|
void |
DisplayDebug ( |
|
|
void |
Possess ( |
Handles attaching this controller to the specified pawn. |
|
void |
SetPawn ( |
Setter for Pawn. Normally should only be used internally when possessing/unpossessing a Pawn. |
|
void |
StopMovement() |
Aborts the move the controller is currently performing |
|
void |
UnPossess() |
Called to unpossess our pawn for any reason that is not the pawn being destroyed (destruction handled by PawnDestroyed()). |
Name | Description | ||
---|---|---|---|
|
void |
PostInitializeComponents() |
Overridden to create the player replication info and perform other mundane initialization tasks. |
|
void |
PostRegisterAllComponents() |
Called after all the components in the Components array are registered |
|
void |
Reset() |
Reset actor to initial state - used when restarting level without reloading. |
|
void |
Tick ( |
Function called every frame on this Actor. |
Name | Description | ||
---|---|---|---|
|
IPathFollowi ... |
GetPathFollowingAgent() |
Retrieves PathFollowingAgent for this NavAgent |
|
bool |
IsFollowingAPath() |
-------------------------------------------------------------------// INavAgentInterface -------------------------------------------------------------------// |
|
bool |
ShouldPostponePathUpdates() |
Allows delaying repath requests |
Name | Description | ||
---|---|---|---|
|
UAIPerceptio ... |
GetPerceptionComponent() |
-------------------------------------------------------------------// IAIPerceptionListenerInterface -------------------------------------------------------------------// |
Name | Description | ||
---|---|---|---|
|
AActor * |
GetGameplayTaskAvatar ( |
Get "body" of task's owner / default, having location in world (e.g. Owner = AIController, Avatar = Pawn) |
|
GetGameplayTaskDefaultPriority() |
Get default priority for running a task |
|
|
AActor * |
GetGameplayTaskOwner ( |
Get owner of a task or default one when task is null |
|
UGameplayTas ... |
GetGameplayTasksComponent ( |
-------------------------------------------------------------------// IGameplayTaskOwnerInterface -------------------------------------------------------------------// |
|
void |
OnGameplayTaskActivated ( |
Notify called after GameplayTask changes state to Active (initial activation or resuming) |
|
void |
OnGameplayTaskDeactivated ( |
Notify called after GameplayTask changes state from Active (finishing or pausing) |
|
void |
OnGameplayTaskInitialized ( |
Add empty overrides to fix linker errors if project implements a child class without adding GameplayTasks module dependency |
Name | Description | ||
---|---|---|---|
|
FGenericTeam ... |
GetGenericTeamId() |
Retrieve team identifier in form of FGenericTeamId |
|
void |
SetGenericTeamId ( |
----------------------------------------------------------------// IGenericTeamAgentInterface ----------------------------------------------------------------// |
Name | Description | ||
---|---|---|---|
|
void |
GrabDebugSnapshot ( |
Name |
Description |
---|---|
bAIIgnorePlayers |
If true, AI controllers will ignore players. |
Module |
|
Header |
Runtime/AIModule/Classes/AIController.h |