Module |
|
Header |
/Engine/Source/Runtime/AIModule/Classes/AIController.h |
Include |
#include "AIController.h" |
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? |
|
Blackboard |
Blackboard |
|
|
uint32: 1 |
bLOSflag |
Used for alternating LineOfSight traces |
|
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 |
bStartAILogicOnPossess |
By default AI's logic does not start when controlled Pawn is possessed. |
|
uint32: 1 |
bStopAILogicOnUnposses |
By default AI's logic gets stopped when controlled Pawn is unpossessed. |
|
uint32: 1 |
bWantsPlayerState |
Specifies if this AI wants its own PlayerState. |
|
CachedGameplayTasksComponent |
||
|
TSubclassOf< UN... |
DefaultNavigationFilterClass |
|
|
FocusInformation |
||
|
PerceptionComponent |
||
|
ReceiveMoveCompleted |
Blueprint notification that we've completed the current movement request |
Name | Description | |
---|---|---|
|
AAIController ( |
Name | Description | ||
---|---|---|---|
|
ActorsPerceptionUpdated |
Notifies AIController of changes in given actors' perception |
|
|
AreAIIgnoringPlayers() |
||
|
BuildPathfindingQuery ( |
Helper function for creating pathfinding query for this agent from move request data |
|
|
ClaimTaskResource ( |
||
|
ClearFocus ( |
Clears Focus for given priority, will also clear FocalPoint as a result |
|
|
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 |
|
HasPartialPath() |
Returns true if the current PathFollowingComponent's path is partial (does not reach desired destination). |
|
|
InitializeBlackboard ( |
||
|
K2_ClearFocus() |
Clears Focus, will also clear FocalPoint as a result |
|
|
K2_SetFocalPoint ( |
Set the position that controller should be looking at. |
|
|
K2_SetFocus ( |
Set Focus for actor, will set FocalPoint as a result. |
|
|
LineOfSightTo |
Checks line to center and top of other actor |
|
|
FPathFollowi... |
MoveTo ( |
Makes AI go toward specified destination |
|
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 |
|
OnGameplayTaskResourcesClaimed ( |
||
|
OnMoveCompleted ( |
||
|
OnMoveCompleted ( |
Called on completing current movement request |
|
|
OnUsingBlackBoard ( |
||
|
PauseMove ( |
If AI is currently moving due to request given by RequestToPause, then the move will be paused |
|
|
PerformAction ( |
Actions. |
|
|
PreparePathfinding ( |
||
|
RequestMove ( |
Passes move request and path object to path following |
|
|
RequestPathAndMove ( |
||
|
ResumeMove ( |
Resumes last AI-performed, paused request provided it's ID was equivalent to RequestToResume |
|
|
RunBehaviorTree ( |
Starts executing behavior tree. |
|
|
SetFocalPoint ( |
Set FocalPoint for given priority as absolute position or offset from base. |
|
|
SetFocus ( |
Set Focus actor for given priority, will set FocalPoint as a result. |
|
|
SetMoveBlockDetection ( |
Updates state of movement block detection. |
|
|
SetPathFollowingComponent ( |
Note that his function does not do any pathfollowing state transfer. |
|
|
SetPerceptionComponent ( |
||
|
ShouldSyncBlackboardWith ( |
Does this AIController allow given UBlackboardComponent sync data with it |
|
|
SuggestTossVelocity |
Computes a launch velocity vector to toss a projectile and hit the given destination. |
|
|
ToggleAIIgnorePlayers() |
Cheat/debugging functions. |
|
|
UnclaimTaskResource ( |
||
|
UpdateControlRotation ( |
Update direction AI is looking based on FocalPoint |
|
|
UseBlackboard ( |
Makes AI use the specified Blackboard asset & creates a Blackboard Component if one does not already exist. |
Name | Description | ||
---|---|---|---|
|
DisplayDebug ( |
||
|
OnPossess ( |
Overridable native function for when this controller possesses a pawn. |
|
|
OnUnPossess() |
Overridable native function for when this controller unpossesses its pawn. |
|
|
SetPawn ( |
Setter for Pawn. Normally should only be used internally when possessing/unpossessing a Pawn. |
|
|
StopMovement() |
Aborts the move the controller is currently performing |
Name | Description | ||
---|---|---|---|
|
PostInitializeComponents() |
Overridden to create the player replication info and perform other mundane initialization tasks. |
|
|
PostRegisterAllComponents() |
Called after all the components in the Components array are registered, called both in editor and during gameplay |
|
|
Reset() |
Reset actor to initial state - used when restarting level without reloading. |
|
|
Tick ( |
Function called every frame on this Actor. |
Name | Description | ||
---|---|---|---|
|
IPathFollowi... |
GetPathFollowingAgent() |
Retrieves PathFollowingAgent for this NavAgent |
|
IsFollowingAPath() |
Checks if the agent is actively following a navigation path |
|
|
ShouldPostponePathUpdates() |
Allows delaying repath requests |
Name | Description | ||
---|---|---|---|
|
UAIPerceptio... |
GetPerceptionComponent() |
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 ( |
Finds tasks component for given GameplayTask, Task.GetGameplayTasksComponent() may not be initialized at this point! |
|
OnGameplayTaskActivated ( |
Notify called after GameplayTask changes state to Active (initial activation or resuming) |
|
|
OnGameplayTaskDeactivated ( |
Notify called after GameplayTask changes state from Active (finishing or pausing) |
|
|
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 |
|
SetGenericTeamId ( |
Assigns Team Agent to given TeamID |
Name | Description | ||
---|---|---|---|
|
GrabDebugSnapshot ( |
Name |
Description |
---|---|
bAIIgnorePlayers |
If true, AI controllers will ignore players. |