Navigation
API > API/Plugins > API/Plugins/ModularGameplay
ControllerComponent is an actor component made for AController and receives controller events.
| Name | UControllerComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/ModularGameplay/Source/ModularGameplay/Public/Components/ControllerComponent.h |
| Include Path | #include "Components/ControllerComponent.h" |
Syntax
UCLASS (MinimalAPI)
class UControllerComponent : public UGameFrameworkComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UGameFrameworkComponent → UControllerComponent
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UControllerComponent
(
const FObjectInitializer& ObjectInitializer |
Components/ControllerComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T * GetController() |
Gets the controller that owns the component, this will always be valid during gameplay but can return null in the editor | Components/ControllerComponent.h | |
T * GetControllerChecked() |
Components/ControllerComponent.h | ||
T * GetPawn() |
Controller accessors Usable for any type of AController owner, only valid if called during gameplay Returns the pawn that is currently possessed by the owning controller, will often return null | Components/ControllerComponent.h | |
T * GetPawnOrViewTarget() |
If this controller is possessing a pawn return the pawn, if not return the view target | Components/ControllerComponent.h | |
T * GetPlayer() |
PlayerController accessors Only returns correct values for APlayerController owners | Components/ControllerComponent.h | |
T * GetPlayerState() |
Returns the player state attached to this controller if there is one | Components/ControllerComponent.h | |
void GetPlayerViewPoint
(
FVector& Location, |
Returns the point of view for either a player or controlled pawn | Components/ControllerComponent.h | |
T * GetViewTarget() |
Returns the actor that is serving as the current view target for the owning controller | Components/ControllerComponent.h | |
bool IsLocalController() |
Returns true if the owning controller is considered to be local | Components/ControllerComponent.h | |
virtual void PlayerTick
(
float DeltaTime |
PlayerTick is only called if the PlayerController has a PlayerInput object. | Components/ControllerComponent.h | |
virtual void ReceivedPlayer() |
PlayerController events These only happen if the controller is a PlayerController Called after the PlayerController's viewport/net connection is associated with this player controller. | Components/ControllerComponent.h |