Navigation
API > API/Runtime > API/Runtime/Engine
PlayerControllers are used by human players to control Pawns.
ControlRotation (accessed via GetControlRotation()), determines the aiming orientation of the controlled Pawn.
In networked games, PlayerControllers exist on the server for every player-controlled pawn, and also on the controlling client's machine. They do NOT exist on a client's machine for pawns controlled by remote players elsewhere on the network.
| Name | APlayerController |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerController.h |
| Include Path | #include "GameFramework/PlayerController.h" |
Syntax
UCLASS (Config=Game, BlueprintType, Blueprintable,
Meta=(ShortTooltip="A Player Controller is an actor responsible for controlling a Pawn used by the player."),
MinimalAPI)
class APlayerController :
public AController ,
public IWorldPartitionStreamingSourceProvider
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → AController → APlayerController
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
APlayerController
(
const FObjectInitializer& ObjectInitializer |
Default Constructor | GameFramework/PlayerController.h |
Structs
| Name | Remarks |
|---|---|
| FDynamicForceFeedbackAction |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AcknowledgedPawn | TObjectPtr< APawn > | Used in net games so client can acknowledge it possessed a specific pawn. | GameFramework/PlayerController.h | |
| ActiveForceFeedbackEffects | TArray< FActiveForceFeedbackEffect > | GameFramework/PlayerController.h |
|
|
| ActiveHapticEffect_Gun | TSharedPtr< struct FActiveHapticFeedbackEffect > | GameFramework/PlayerController.h | ||
| ActiveHapticEffect_HMD | TSharedPtr< struct FActiveHapticFeedbackEffect > | GameFramework/PlayerController.h | ||
| ActiveHapticEffect_Left | TSharedPtr< struct FActiveHapticFeedbackEffect > | Currently playing haptic effects for both the left and right hand | GameFramework/PlayerController.h | |
| ActiveHapticEffect_Right | TSharedPtr< struct FActiveHapticFeedbackEffect > | GameFramework/PlayerController.h | ||
| bAutoManageActiveCameraTarget | bool | True to allow this player controller to manage the camera target for you, typically by using the possessed pawn as the camera target. | GameFramework/PlayerController.h |
|
| bCinematicMode | uint32 | Is this player currently in cinematic mode? Prevents rotation/movement/firing/etc | GameFramework/PlayerController.h | |
| bEnableClickEvents | uint32 | Whether actor/component click events should be generated. | GameFramework/PlayerController.h |
|
| bEnableMotionControls | uint32 | Whether or not to consider input from motion sources (tilt, acceleration, etc) | GameFramework/PlayerController.h |
|
| bEnableMouseOverEvents | uint32 | Whether actor/component mouse over events should be generated. | GameFramework/PlayerController.h |
|
| bEnableStreamingSource | uint32 | Whether the PlayerController should be used as a World Partiton streaming source. | GameFramework/PlayerController.h |
|
| bEnableTouchEvents | uint32 | Whether actor/component touch events should be generated. | GameFramework/PlayerController.h |
|
| bEnableTouchOverEvents | uint32 | Whether actor/component touch over events should be generated. | GameFramework/PlayerController.h |
|
| bForceFeedbackEnabled | uint32 | GameFramework/PlayerController.h |
|
|
| bHidePawnInCinematicMode | uint32 | When cinematic mode is true, signifies that this controller's pawn should be hidden | GameFramework/PlayerController.h | |
| bIsUsingStreamingVolumes | uint32 | Whether this controller is using streaming volumes. | GameFramework/PlayerController.h | |
| BlendedTargetViewRotation | FRotator | Smoothed version of TargetViewRotation to remove jerkiness from intermittent replication updates. | GameFramework/PlayerController.h | |
| bPlayerIsWaiting | uint32 | True if PlayerController is currently waiting for the match to start or to respawn. | GameFramework/PlayerController.h |
|
| bRenderPrimitiveComponents | bool | Whether to render primitives component. | GameFramework/PlayerController.h | |
| bShortConnectTimeOut | uint32 | When true, reduces connect timeout from InitialConnectionTimeOut to ConnectionTimeout. | GameFramework/PlayerController.h | |
| bShowMouseCursor | uint32 | Whether the mouse cursor should be displayed. | GameFramework/PlayerController.h |
|
| bStreamingSourceShouldActivate | uint32 | Whether the PlayerController streaming source should activate cells after loading. | GameFramework/PlayerController.h |
|
| bStreamingSourceShouldBlockOnSlowStreaming | uint32 | Whether the PlayerController streaming source should block on slow streaming. | GameFramework/PlayerController.h |
|
| CheatClass | TSubclassOf< UCheatManager > | Class of my CheatManager. | GameFramework/PlayerController.h |
|
| CheatManager | TObjectPtr< UCheatManager > | Object that manages "cheat" commands. | GameFramework/PlayerController.h |
|
| ClickEventKeys | TArray< FKey > | List of keys that will cause click events to be forwarded, default to left click | GameFramework/PlayerController.h |
|
| ClientCap | int32 | Cap set by server on bandwidth from client to server in bytes/sec (only has impact if >=2600) | GameFramework/PlayerController.h | |
| CurrentClickTraceChannel | TEnumAsByte< ECollisionChannel > | Trace channel currently being used for determining what world object was clicked on. | GameFramework/PlayerController.h |
|
| CurrentMouseCursor | TEnumAsByte< EMouseCursor::Type > | Currently visible mouse cursor | GameFramework/PlayerController.h |
|
| DefaultClickTraceChannel | TEnumAsByte< ECollisionChannel > | Default trace channel used for determining what world object was clicked on. | GameFramework/PlayerController.h |
|
| DefaultMouseCursor | TEnumAsByte< EMouseCursor::Type > | Type of mouse cursor to show by default | GameFramework/PlayerController.h |
|
| ForceFeedbackEffectHistoryEntries | TArray< FForceFeedbackEffectHistoryEntry > | For debugging, shows the last force feeback effects that played | GameFramework/PlayerController.h | |
| ForceFeedbackScale | float | Scale applied to force feedback values | GameFramework/PlayerController.h |
|
| ForceFeedbackValues | FForceFeedbackValues | Currently active force feedback weights | GameFramework/PlayerController.h | |
| HiddenActors | TArray< TObjectPtr< class AActor > > | The actors which the camera shouldn't see - e.g. used to hide actors which the camera penetrates | GameFramework/PlayerController.h | |
| HiddenPrimitiveComponents | TArray< TWeakObjectPtr< UPrimitiveComponent > > | Explicit components the camera shouldn't see (helpful for external systems to hide a component from a single player) | GameFramework/PlayerController.h | |
| HitResultTraceDistance | float | Distance to trace when computing click events | GameFramework/PlayerController.h |
|
| LastCompletedSeamlessTravelCount | uint16 | The value of SeamlessTravelCount, upon the last call to GameModeBase::HandleSeamlessTravelPlayer; used to detect seamless travel | GameFramework/PlayerController.h | |
| LastSpectatorStateSynchTime | float | Used to make sure the client is kept synchronized when in a spectator state | GameFramework/PlayerController.h | |
| LastSpectatorSyncLocation | FVector | Last location synced on the server for a spectator. | GameFramework/PlayerController.h |
|
| LastSpectatorSyncRotation | FRotator | Last rotation synced on the server for a spectator. | GameFramework/PlayerController.h |
|
| LocalPlayerCachedLODDistanceFactor | float | Last used FOV based multiplier to distance to an object when determining if it exceeds the object's cull distance | GameFramework/PlayerController.h | |
| MuteList | FPlayerMuteList | List of muted players in various categories | GameFramework/PlayerController.h | |
| MyHUD | TObjectPtr< AHUD > | Heads up display associated with this PlayerController. | GameFramework/PlayerController.h | |
| NetConnection | TObjectPtr< UNetConnection > | The net connection this controller is communicating on, nullptr for local players on server | GameFramework/PlayerController.h |
|
| NetPlayerIndex | uint8 | Index identifying players using the same base connection (splitscreen clients) Used by netcode to match replicated PlayerControllers to the correct splitscreen viewport and child connection replicated via special internal code, not through normal variable replication | GameFramework/PlayerController.h |
|
| PendingMapChangeLevelNames | TArray< FName > | List of names of levels the server is in the middle of sending us for a PrepareMapChange() call | GameFramework/PlayerController.h | |
| PendingSwapConnection | TObjectPtr< UNetConnection > | This is set on the OLD PlayerController when performing a swap over a network connection so we know what connection we're waiting on acknowledgment from to finish destroying this PC (or when the connection is closed) | GameFramework/PlayerController.h |
|
| Player | TObjectPtr< UPlayer > | UPlayer associated with this PlayerController. | GameFramework/PlayerController.h | |
| PlayerCameraManager | TObjectPtr< APlayerCameraManager > | Camera/view related variables Camera manager associated with this Player Controller. | GameFramework/PlayerController.h |
|
| PlayerCameraManagerClass | TSubclassOf< APlayerCameraManager > | PlayerCamera class should be set for each game, otherwise Engine.PlayerCameraManager is used | GameFramework/PlayerController.h |
|
| PlayerInput | TObjectPtr< UPlayerInput > | Object that manages player input. | GameFramework/PlayerController.h |
|
| RotationInput | FRotator | Input axes values, accumulated each tick. | GameFramework/PlayerController.h | |
| SeamlessTravelCount | uint16 | Counter for this players seamless travels (used along with the below value, to restrict ServerNotifyLoadedWorld) | GameFramework/PlayerController.h | |
| SmoothTargetViewRotationSpeed | float | Interp speed for blending remote view rotation for smoother client updates | GameFramework/PlayerController.h |
|
| StreamingSourceDebugColor | FColor | Color used for debugging. | GameFramework/PlayerController.h |
|
| StreamingSourcePriority | EStreamingSourcePriority | PlayerController streaming source priority. | GameFramework/PlayerController.h |
|
| StreamingSourceShapes | TArray< FStreamingSourceShape > | Optional aggregated shape list used to build a custom shape for the streaming source. | GameFramework/PlayerController.h |
|
| TargetViewRotation | FRotator | Used to replicate the view rotation of targets not owned/possessed by this PlayerController. | GameFramework/PlayerController.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDisableHaptics | bool | If true, prevent any haptic effects from playing | GameFramework/PlayerController.h | |
| bInputEnabled | uint32 | Whether the PlayerController's input handling is enabled. | GameFramework/PlayerController.h | |
| bIsLocalPlayerController | bool | Set during SpawnActor once and never again to indicate the intent of this controller instance (SERVER ONLY) | GameFramework/PlayerController.h | |
| bNetworkPhysicsTickOffsetAssigned | bool | GameFramework/PlayerController.h | ||
| bSendClientRestartRPC | bool | GameFramework/PlayerController.h | ||
| bShouldFlushInputWhenViewportFocusChanges | bool | If true, then the GameViewportCliet will call FlushPressedKeys when it loses focus ( UGameViewportClient::LostFocus ). | GameFramework/PlayerController.h | |
| CachedConnectionPlayerId | FUniqueNetIdRepl | The player id associated with this player controller. | GameFramework/PlayerController.h | |
| ClientHandshakeId | uint32 | An optional client handshake id used by the connection associated with this player controller. | GameFramework/PlayerController.h |
|
| CurrentInputModeDebugString | FString | Keep track of the current input mode debug string here. Set in APlayerController::SetInputMode | GameFramework/PlayerController.h | |
| DynamicForceFeedbacks | TSortedMap< FDynamicForceFeedbackHandle, FDynamicForceFeedbackAction > | Map of dynamic force feedback effects invoked from native | GameFramework/PlayerController.h | |
| LastRetryPlayerTime | float | Used to delay calling ClientRestart() again when it hasn't been appropriately acknowledged. | GameFramework/PlayerController.h | |
| LatentDynamicForceFeedbacks | TSortedMap< int32, FDynamicForceFeedbackDetails * > | Map of dynamic force feedback effects invoked from blueprints | GameFramework/PlayerController.h | |
| NetConditionGroups | TArray< FName > | List of netcondition groups we are currently a member of. | GameFramework/PlayerController.h | |
| NetworkPhysicsTickOffset | int32 | The static offset between the local async physics tick frame number and the server's, kept in sync via time-dilation This is used to synchronize events that happen in the async physics tick This is 0 on the server | GameFramework/PlayerController.h | |
| NetworkPhysicsTickOffsetDesyncAccumulatedTime | float | Time that tick offset has been desynced for since it was last in sync, used to trigger a correction | GameFramework/PlayerController.h | |
| SpectatorPawn | TObjectPtr< ASpectatorPawn > | The pawn used when spectating (nullptr if not spectating). | GameFramework/PlayerController.h | |
| TickOffsetSyncCountdown | float | Tick Offset sync interval timer | GameFramework/PlayerController.h | |
| TimerHandle_ClientCommitMapChange | FTimerHandle | Handle for efficient management of ClientCommitMapChange timer | GameFramework/PlayerController.h | |
| TimerHandle_DelayedPrepareMapChange | FTimerHandle | Handle for efficient management of DelayedPrepareMapChange timer | GameFramework/PlayerController.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AcknowledgePossession
(
APawn* P |
Called on the client to do local pawn setup after possession, before calling ServerAcknowledgePossession | GameFramework/PlayerController.h | |
virtual void ActivateTouchInterface
(
UTouchInterface* NewTouchInterface |
Activates a new touch interface for this player controller | GameFramework/PlayerController.h |
|
virtual void AddCheats
(
bool bForce |
Called to try and enable cheats for this player, happens during initialization or from AllowCheats command | GameFramework/PlayerController.h | |
virtual void AddPitchInput
(
float Val |
Add Pitch (look up) input. This value is multiplied by InputPitchScale. | GameFramework/PlayerController.h |
|
virtual void AddRollInput
(
float Val |
Add Roll input. This value is multiplied by InputRollScale. | GameFramework/PlayerController.h |
|
virtual void AddYawInput
(
float Val |
Add Yaw (turn) input. This value is multiplied by InputYawScale. | GameFramework/PlayerController.h |
|
virtual void AutoManageActiveCameraTarget
(
AActor* SuggestedTarget |
If bAutoManageActiveCameraTarget is true, then automatically manage the active camera target. | GameFramework/PlayerController.h | |
void BuildHiddenComponentList
(
const FVector& ViewLocation, |
Builds a list of components that are hidden based upon gameplay. | GameFramework/PlayerController.h | |
virtual void Camera
(
FName NewMode |
Change Camera mode | GameFramework/PlayerController.h |
|
virtual bool CanRestartPlayer () |
Returns true if this controller thinks it's able to restart. | GameFramework/PlayerController.h |
|
virtual void CleanUpAudioComponents() |
Clears out 'left-over' audio components. | GameFramework/PlayerController.h | |
virtual void CleanupGameViewport() |
Gives the PlayerController an opportunity to cleanup any changes it applied to the game viewport, primarily for the touch interface | GameFramework/PlayerController.h | |
void ClearAudioListenerAttenuationOverride() |
GameFramework/PlayerController.h |
|
|
void ClearAudioListenerOverride() |
Clear any overrides that have been applied to audio listener | GameFramework/PlayerController.h |
|
void ClientAckTimeDilation
(
float TimeDilation, |
Client receives the time dilation value it needs to use to keep its ServerFrame to LocalFrame offset in sync | GameFramework/PlayerController.h |
|
void ClientAckUpdateLevelVisibility
(
FName PackageName, |
Acknowledge received LevelVisibilityTransactionId | GameFramework/PlayerController.h |
|
void ClientAddTextureStreamingLoc
(
FVector InLoc, |
Adds a location to the texture streaming system for the specified duration. | GameFramework/PlayerController.h |
|
void ClientCancelPendingMapChange() |
Tells client to cancel any pending map change. | GameFramework/PlayerController.h |
|
void ClientCapBandwidth
(
int32 Cap |
Set CurrentNetSpeed to the lower of its current value and Cap. | GameFramework/PlayerController.h |
|
virtual void ClientClearCameraLensEffects() |
Removes all Camera Lens Effects. | GameFramework/PlayerController.h |
|
void ClientCommitMapChange() |
Actually performs the level transition prepared by PrepareMapChange(). | GameFramework/PlayerController.h |
|
virtual void ClientEnableNetworkVoice
(
bool bEnable |
Tell the client to enable or disable voice chat (not muting) | GameFramework/PlayerController.h |
|
void ClientEndOnlineSession() |
Notify client that the session is about to start | GameFramework/PlayerController.h |
|
void ClientFlushLevelStreaming() |
Tells the client to block until all pending level streaming actions are complete happens at the end of the tick primarily used to force update the client ASAP at join time | GameFramework/PlayerController.h |
|
void ClientForceGarbageCollection() |
Forces GC at the end of the tick on the client | GameFramework/PlayerController.h |
|
void ClientGameEnded
(
AActor* EndGameFocus, |
Replicated function called by GameHasEnded(). | GameFramework/PlayerController.h |
|
void ClientGotoState
(
FName NewState |
Server uses this to force client into NewState . | GameFramework/PlayerController.h |
|
void ClientIgnoreLookInput
(
bool bIgnore |
Calls IgnoreLookInput on client | GameFramework/PlayerController.h |
|
void ClientIgnoreMoveInput
(
bool bIgnore |
Calls IgnoreMoveInput on client | GameFramework/PlayerController.h |
|
void ClientMessage
(
const FString& S, |
Outputs a message to HUD | GameFramework/PlayerController.h |
|
virtual void ClientMutePlayer
(
FUniqueNetIdRepl PlayerId |
Tell the client to mute a player for this controller | GameFramework/PlayerController.h |
|
void ClientPlayForceFeedback
(
UForceFeedbackEffect* ForceFeedbackEffect, |
Play a force feedback pattern on the player's controller | GameFramework/PlayerController.h | |
void ClientPlaySound
(
USoundBase* Sound, |
Play sound client-side (so only the client will hear it) | GameFramework/PlayerController.h |
|
void ClientPlaySoundAtLocation
(
USoundBase* Sound, |
Play sound client-side at the specified location | GameFramework/PlayerController.h |
|
void ClientPrepareMapChange
(
FName LevelName, |
Asynchronously loads the given level in preparation for a streaming map transition. | GameFramework/PlayerController.h |
|
void ClientPrestreamTextures
(
AActor* ForcedActor, |
Forces the streaming system to disregard the normal logic for the specified duration and instead always load all mip-levels for all textures used by the specified actor. | GameFramework/PlayerController.h |
|
void ClientReceiveLocalizedMessage
(
TSubclassOf< ULocalMessage > Message, |
Send client localized message id | GameFramework/PlayerController.h |
|
virtual void ClientRepObjRef
(
UObject* Object |
Development RPC for testing object reference replication | GameFramework/PlayerController.h |
|
void ClientReset() |
Tell client to reset the PlayerController | GameFramework/PlayerController.h |
|
void ClientRestart
(
APawn* NewPawn |
Tell client to restart the level | GameFramework/PlayerController.h |
|
void ClientRetryClientRestart
(
APawn* NewPawn |
Assign Pawn to player, but avoid calling ClientRestart if we have already accepted this pawn | GameFramework/PlayerController.h |
|
virtual void ClientReturnToMainMenuWithTextReason
(
const FText& ReturnReason |
Return the client to the main menu gracefully | GameFramework/PlayerController.h |
|
void ClientSetBlockOnAsyncLoading () |
Tells the client to block until all pending level streaming actions are complete. | GameFramework/PlayerController.h |
|
void ClientSetCameraFade
(
bool bEnableFading, |
Tell client to fade camera @Param bEnableFading - true if we should apply FadeColor/FadeAmount to the screen @Param FadeColor - Color to fade to @Param FadeAlpha - Contains the start fade (X) and end fade (Y) values to apply. | GameFramework/PlayerController.h |
|
void ClientSetCameraMode
(
FName NewCamMode |
Replicated function to set camera style on client | GameFramework/PlayerController.h |
|
void ClientSetCinematicMode
(
bool bInCinematicMode, |
Called by the server to synchronize cinematic transitions with the client | GameFramework/PlayerController.h |
|
void ClientSetForceMipLevelsToBeResident
(
UMaterialInterface* Material, |
Forces the streaming system to disregard the normal logic for the specified duration and instead always load all mip-levels for all textures used by the specified material. | GameFramework/PlayerController.h |
|
void ClientSetHUD
(
TSubclassOf< AHUD > NewHUDClass |
Set the client's class of HUD and spawns a new instance of it. | GameFramework/PlayerController.h |
|
void ClientSetSpectatorWaiting
(
bool bWaiting |
Indicate that the Spectator is waiting to join/respawn. | GameFramework/PlayerController.h |
|
void ClientSetupNetworkPhysicsTimestamp
(
FAsyncPhysicsTimestamp Timestamp |
Client receives the setup of the FAsyncPhysicsTimestamp ServerFrame and LocalFrame offset from the server. | GameFramework/PlayerController.h |
|
void ClientSetViewTarget
(
AActor* A, |
Set the view target | GameFramework/PlayerController.h |
|
void ClientSpawnCameraLensEffect
(
TSubclassOf< class AEmitterCameraLensEffectBase > LensEffectEmitterClass |
GameFramework/PlayerController.h |
|
|
void ClientSpawnGenericCameraLensEffect
(
TSubclassOf< class AActor > LensEffectEmitterClass |
Spawn a camera lens effect (e.g. blood). | GameFramework/PlayerController.h |
|
void ClientStartCameraShake
(
TSubclassOf< class UCameraShakeBase > Shake, |
Play Camera Shake | GameFramework/PlayerController.h |
|
void ClientStartCameraShakeFromSource
(
TSubclassOf< class UCameraShakeBase > Shake, |
Play Camera Shake localized to a given source | GameFramework/PlayerController.h |
|
void ClientStartOnlineSession() |
Notify client that the session is starting | GameFramework/PlayerController.h |
|
void ClientStopCameraShake
(
TSubclassOf< class UCameraShakeBase > Shake, |
Stop camera shake on client. | GameFramework/PlayerController.h |
|
void ClientStopCameraShakesFromSource
(
UCameraShakeSourceComponent* SourceComponent, |
Stop camera shake on client. | GameFramework/PlayerController.h |
|
void ClientStopForceFeedback
(
UForceFeedbackEffect* ForceFeedbackEffect, |
Stops a playing force feedback pattern | GameFramework/PlayerController.h |
|
void ClientTeamMessage
(
APlayerState* SenderPlayerState, |
GameFramework/PlayerController.h |
|
|
void ClientTravel
(
const FString& URL, |
Travel to a different map or IP address. | GameFramework/PlayerController.h | |
void ClientTravelInternal
(
const FString& URL, |
Internal clientside implementation of ClientTravel - use ClientTravel to call this | GameFramework/PlayerController.h |
|
virtual void ClientUnmutePlayer
(
FUniqueNetIdRepl PlayerId |
Tell the client to unmute a player for this controller | GameFramework/PlayerController.h |
|
virtual void ClientUnmutePlayers
(
const TArray< FUniqueNetIdRepl >& PlayerIds |
Tell the client to unmute an array of players for this controller | GameFramework/PlayerController.h |
|
void ClientUpdateLevelStreamingStatus
(
FName PackageName, |
Replicated Update streaming status | GameFramework/PlayerController.h |
|
void ClientUpdateMultipleLevelsStreamingStatus
(
const TArray< FUpdateLevelStreamingLevelStatus >& LevelStatuses |
Replicated Update streaming status. | GameFramework/PlayerController.h |
|
virtual void ClientVoiceHandshakeComplete () |
Tells the client that the server has all the information it needs and that it is ok to start sending voice packets. | GameFramework/PlayerController.h |
|
void ClientWasKicked
(
const FText& KickReason |
Notify client they were kicked from the server | GameFramework/PlayerController.h |
|
virtual FString ConsoleCommand
(
const FString& Command, |
Executes the Exec() command on the UPlayer object | GameFramework/PlayerController.h | |
virtual void ConsoleKey
(
FKey Key |
Console control commands, useful when remote debugging so you can't touch the console the normal way | GameFramework/PlayerController.h |
|
virtual void CreateTouchInterface() |
Create the touch interface, and activate an initial touch interface (if touch interface is desired) | GameFramework/PlayerController.h | |
virtual bool DefaultCanUnpause() |
Default implementation of pausing check for 'CanUnpause' delegates | GameFramework/PlayerController.h | |
virtual void DelayedPrepareMapChange() |
Used to wait until a map change can be prepared when one was already in progress | GameFramework/PlayerController.h | |
bool DeprojectMousePositionToWorld
(
FVector& WorldLocation, |
Convert current mouse 2D position to World Space 3D position and direction. | GameFramework/PlayerController.h |
|
bool DeprojectScreenPositionToWorld
(
float ScreenX, |
Convert 2D screen position to World Space 3D position and direction. | GameFramework/PlayerController.h |
|
virtual void EnableCheats() |
Run from the console to try and manually enable cheats which are disabled by default in multiplayer, games can override this | GameFramework/PlayerController.h |
|
void ExecuteAsyncPhysicsCommand
(
const FAsyncPhysicsTimestamp& AsyncPhysicsTimestamp, |
Enqueues a command to run at the time specified by AsyncPhysicsTimestamp. | GameFramework/PlayerController.h | |
virtual void FlushPressedKeys() |
Flushes the current key state. | GameFramework/PlayerController.h | |
void ForceSingleNetUpdateFor
(
AActor* Target |
Forces a full replication check of the specified Actor on only the client that owns this PlayerController this function has no effect if this PC is not a remote client or if the Actor is not relevant to that client | GameFramework/PlayerController.h | |
virtual void FOV
(
float NewFOV |
Set the field of view to NewFOV | GameFramework/PlayerController.h |
|
void GameplayMutePlayer
(
const FUniqueNetIdRepl& PlayerNetId |
Mutes a remote player on the server and then tells the client to mute | GameFramework/PlayerController.h | |
void GameplayUnmuteAllPlayers() |
Unmutes all remote players muted due to gameplay rules on the server and then tells the client to unmute | GameFramework/PlayerController.h | |
void GameplayUnmutePlayer
(
const FUniqueNetIdRepl& PlayerNetId |
Unmutes a remote player on the server and then tells the client to unmute | GameFramework/PlayerController.h | |
virtual bool GetAudioListenerAttenuationOverridePosition
(
FVector& OutLocation |
Gets the attenuation position override. | GameFramework/PlayerController.h | |
virtual void GetAudioListenerPosition
(
FVector& OutLocation, |
Get audio listener position and orientation | GameFramework/PlayerController.h | |
uint32 GetClientHandshakeId() |
Return the handshake cookie of the connection this player controller is associated. | GameFramework/PlayerController.h | |
const FString & GetCurrentInputModeDebugString() |
Keep track of the current input mode debug string here. Set in APlayerController::SetInputMode | GameFramework/PlayerController.h | |
float GetDeprecatedInputPitchScale () |
A getter for the deprecated InputPitchScale property. | GameFramework/PlayerController.h |
|
float GetDeprecatedInputRollScale () |
A getter for the deprecated InputRollScale property. | GameFramework/PlayerController.h |
|
float GetDeprecatedInputYawScale () |
A getter for the deprecated InputYawScale property. | GameFramework/PlayerController.h |
|
virtual FVector GetFocalLocation () |
Returns the location the PlayerController is focused on. | GameFramework/PlayerController.h |
|
bool GetHitResultAtScreenPosition
(
const FVector2D ScreenPosition, |
GameFramework/PlayerController.h | ||
bool GetHitResultAtScreenPosition
(
const FVector2D ScreenPosition, |
GameFramework/PlayerController.h | ||
bool GetHitResultAtScreenPosition
(
const FVector2D ScreenPosition, |
GameFramework/PlayerController.h | ||
bool GetHitResultAtScreenPosition
(
const FVector2D ScreenPosition, |
Returns hit results from doing a collision query at a certain location on the screen | GameFramework/PlayerController.h | |
bool GetHitResultUnderCursor
(
ECollisionChannel TraceChannel, |
GameFramework/PlayerController.h |
|
|
bool GetHitResultUnderCursorByChannel
(
ETraceTypeQuery TraceChannel, |
Performs a collision query under the mouse cursor, looking on a trace channel | GameFramework/PlayerController.h |
|
bool GetHitResultUnderCursorForObjects
(
const TArray< TEnumAsByte< EObjectTypeQuery > >& ObjectTypes, |
Performs a collision query under the mouse cursor, looking for object types | GameFramework/PlayerController.h |
|
bool GetHitResultUnderFinger
(
ETouchIndex::Type FingerIndex, |
GameFramework/PlayerController.h |
|
|
bool GetHitResultUnderFingerByChannel
(
ETouchIndex::Type FingerIndex, |
Performs a collision query under the finger, looking on a trace channel | GameFramework/PlayerController.h |
|
bool GetHitResultUnderFingerForObjects
(
ETouchIndex::Type FingerIndex, |
Performs a collision query under the finger, looking for object types | GameFramework/PlayerController.h |
|
| Gets the HUD currently being used by this player controller | GameFramework/PlayerController.h |
|
|
T * GetHUD () |
Templated version of GetHUD, will return nullptr if cast fails | GameFramework/PlayerController.h | |
float GetInputAnalogKeyState
(
FKey Key |
Returns the analog value for the given key/button. | GameFramework/PlayerController.h |
|
void GetInputAnalogStickState
(
EControllerAnalogStick::Type WhichStick, |
Retrieves the X and Y displacement of the given analog stick. | GameFramework/PlayerController.h |
|
void GetInputAnalogStickState
(
EControllerAnalogStick::Type WhichStick, |
GameFramework/PlayerController.h |
|
|
float GetInputKeyTimeDown
(
FKey Key |
Returns how long the given key/button has been down. | GameFramework/PlayerController.h |
|
void GetInputMotionState
(
FVector& Tilt, |
Retrieves the current motion state of the player's input device | GameFramework/PlayerController.h |
|
void GetInputMouseDelta
(
float& DeltaX, |
Retrieves how far the mouse moved this frame. | GameFramework/PlayerController.h |
|
void GetInputMouseDelta
(
double& DeltaX, |
GameFramework/PlayerController.h |
|
|
void GetInputTouchState
(
ETouchIndex::Type FingerIndex, |
GameFramework/PlayerController.h |
|
|
void GetInputTouchState
(
ETouchIndex::Type FingerIndex, |
Retrieves the X and Y screen coordinates of the specified touch key. | GameFramework/PlayerController.h |
|
FVector GetInputVectorKeyState
(
FKey Key |
Returns the vector value for the given key/button. | GameFramework/PlayerController.h |
|
ULocalPlayer * GetLocalPlayer() |
Returns the ULocalPlayer for this controller if it exists, or null otherwise | GameFramework/PlayerController.h | |
virtual float GetMinRespawnDelay() |
Calculate minimal respawn delay | GameFramework/PlayerController.h | |
virtual EMouseCursor::Type GetMouseCursor() |
Returns the current mouse cursor, or None | GameFramework/PlayerController.h | |
bool GetMousePosition
(
float& LocationX, |
Retrieves the X and Y screen coordinates of the mouse cursor. | GameFramework/PlayerController.h |
|
bool GetMousePosition
(
double& LocationX, |
GameFramework/PlayerController.h |
|
|
| Returns the list of netcondition groups we are part of. | GameFramework/PlayerController.h | ||
int32 GetNetworkPhysicsTickOffset() |
Get the physics frame number offset between Local and Server, recommended is to use GetPhysicsTimestamp() which takes this offset into account on the client for the ServerFrame value | GameFramework/PlayerController.h | |
bool GetNetworkPhysicsTickOffsetAssigned() |
True if the NetworkPhysicsTickOffset is setup, before this is setup the GetNetworkPhysicsTickOffset() and GetPhysicsTimestamp() functions will not return valid results | GameFramework/PlayerController.h | |
virtual APlayerState * GetNextViewablePlayer
(
int32 dir |
Get next active viewable player in PlayerArray. | GameFramework/PlayerController.h | |
TSubclassOf< UPlayerInput > GetOverridePlayerInputClass() |
GameFramework/PlayerController.h |
|
|
APawn * GetPawnOrSpectator() |
Returns the first of GetPawn() or GetSpectatorPawn() that is not nullptr, or nullptr otherwise. | GameFramework/PlayerController.h | |
FAsyncPhysicsTimestamp GetPhysicsTimestamp
(
float DeltaSeconds |
Generates a timestamp for the upcoming physics step (plus any pending time). | GameFramework/PlayerController.h | |
| Returns the platform user that is assigned to this Player Controller's Local Player. | GameFramework/PlayerController.h |
|
|
virtual APlayerController * GetPlayerControllerForMuting
(
const FUniqueNetIdRepl& PlayerNetId |
Get a remote player controller on the server for muting | GameFramework/PlayerController.h | |
FString GetPlayerNetworkAddress() |
Get the local players network address | GameFramework/PlayerController.h | |
virtual void GetSeamlessTravelActorList
(
bool bToEntry, |
Called on client during seamless level transitions to get the list of Actors that should be moved into the new level PlayerControllers, Role < ROLE_Authority Actors, and any non-Actors that are inside an Actor that is in the list (i.e. Object.Outer == Actor in the list) are all automatically moved regardless of whether they're included here only dynamic actors in the PersistentLevel may be moved (this includes all actors spawned during gameplay) this is called for both parts of the transition because actors might change while in the middle (e.g. players might join or leave the game) | GameFramework/PlayerController.h | |
FString GetServerNetworkAddress() |
Get the server network address | GameFramework/PlayerController.h | |
FVector GetSpawnLocation() |
Get the location used when initially created, or when changing states when there is no pawn or spectator. | GameFramework/PlayerController.h | |
ASpectatorPawn * GetSpectatorPawn() |
Get the Pawn used when spectating. nullptr when not spectating. | GameFramework/PlayerController.h |
|
APlayerState * GetSplitscreenPlayerByIndex
(
int32 PlayerIndex |
Returns the PlayerState associated with the player at the specified index. | GameFramework/PlayerController.h | |
int32 GetSplitscreenPlayerCount() |
Returns the number of split-screen players playing on this player's machine. | GameFramework/PlayerController.h | |
virtual void GetStreamingSourceLocationAndRotation
(
FVector& OutLocation, |
Gets the streaming source location and rotation. | GameFramework/PlayerController.h |
|
| Gets the streaming source priority. | GameFramework/PlayerController.h |
|
|
virtual void GetStreamingSourceShapes
(
TArray< FStreamingSourceShape >& OutShapes |
Gets the streaming source priority. | GameFramework/PlayerController.h |
|
void GetViewportSize
(
int32& SizeX, |
Helper to get the size of the HUD canvas for this player controller. Returns 0 if there is no HUD | GameFramework/PlayerController.h |
|
bool HasClientLoadedCurrentWorld() |
Returns whether the client has completely loaded the server's current world (valid on server only) | GameFramework/PlayerController.h | |
void IncludeInNetConditionGroup
(
FName NetGroup |
Make this player a member of a netcondition group. | GameFramework/PlayerController.h | |
virtual void InitInputSystem () |
Spawn the appropriate class of PlayerInput. | GameFramework/PlayerController.h | |
bool InputEnabled() |
GameFramework/PlayerController.h | ||
virtual bool InputKey
(
const FInputKeyEventArgs& Params |
Handles a key press | GameFramework/PlayerController.h | |
virtual PRAGMA_DISABLE_DEPRECATION_WARNINGS bool InputKey
(
const FInputKeyParams& Params |
Handles a key press | GameFramework/PlayerController.h | |
virtual bool InputMotion
(
const FInputDeviceId DeviceId, |
Handles motion control | GameFramework/PlayerController.h | |
virtual bool InputMotion
(
const FVector& Tilt, |
Handles motion control | GameFramework/PlayerController.h | |
virtual bool InputTouch
(
uint32 Handle, |
Handles a touch screen action | GameFramework/PlayerController.h | |
virtual bool InputTouch
(
const FInputDeviceId DeviceId, |
Handles a touch screen action | GameFramework/PlayerController.h | |
virtual bool IsFrozen() |
Returns true if input should be frozen (whether UnFreeze timer is active) | GameFramework/PlayerController.h | |
virtual bool IsInputComponentInStack
(
const UInputComponent* Input |
Returns true if the given input component is in this PlayerController's CurrentInputStack | GameFramework/PlayerController.h | |
bool IsInputKeyDown
(
FKey Key |
Returns true if the given key/button is pressed on the input of the controller (if present) | GameFramework/PlayerController.h |
|
bool IsMemberOfNetConditionGroup
(
FName NetGroup |
Returns true if the player controller is a member of the netcondition group | GameFramework/PlayerController.h | |
bool IsPaused() |
Returns true if game is currently paused. | GameFramework/PlayerController.h | |
virtual bool IsPlayerMuted
(
const FUniqueNetId& PlayerId |
Is the specified player muted by this controlling player for any reason (gameplay, system, etc), check voice interface IsMuted() for system mutes | GameFramework/PlayerController.h | |
bool IsPrimaryPlayer() |
Wrapper for determining whether this player is the first player on their console. | GameFramework/PlayerController.h |
|
bool IsSplitscreenPlayer
(
int32* OutSplitscreenPlayerIndex |
Determines whether this player is playing split-screen. | GameFramework/PlayerController.h | |
virtual bool IsStreamingSourceEnabled () |
Whether the PlayerController should be used as a World Partiton streaming source. | GameFramework/PlayerController.h |
|
void K2_ClientPlayForceFeedback
(
UForceFeedbackEffect* ForceFeedbackEffect, |
Play a force feedback pattern on the player's controller | GameFramework/PlayerController.h |
|
void LevelStreamingStatusChanged
(
ULevelStreaming* LevelObject, |
Notify player of change to level | GameFramework/PlayerController.h | |
void LevelStreamingStatusChanged
(
ULevelStreaming* LevelObject, |
GameFramework/PlayerController.h | ||
virtual void LocalTravel
(
const FString& URL |
Causes the client to travel to the given URL | GameFramework/PlayerController.h |
|
| Handles remapping a package name for networking, call on both the client and server when sending package names manually for RPCs | GameFramework/PlayerController.h | ||
virtual void NotifyActorChannelFailure
(
UActorChannel* ActorChan |
Called on the server when the client sends a message indicating it was unable to initialize an Actor channel, most commonly because the desired Actor's archetype couldn't be serialized the default is to do nothing (Actor simply won't exist on the client), but this function gives the game code an opportunity to try to correct the problem | GameFramework/PlayerController.h | |
virtual void NotifyLoadedWorld
(
FName WorldPackageName, |
Called to notify the server when the client has loaded a new world via seamless traveling | GameFramework/PlayerController.h | |
virtual bool NotifyServerReceivedClientData
(
APawn* InPawn, |
Notify the server that client data was received on the Pawn. | GameFramework/PlayerController.h | |
void OnAddedToPlayerControllerList() |
Called when player controller gets added to its owning world player controller list. | GameFramework/PlayerController.h | |
void OnRemovedFromPlayerControllerList() |
Called when player controller gets removed from its owning world player controller list. | GameFramework/PlayerController.h | |
void OnServerStartedVisualLogger
(
bool bIsLogging |
Notify from server that Visual Logger is recording, to show that information on client about possible performance issues | GameFramework/PlayerController.h |
|
virtual void Pause() |
Command to try to pause the game. | GameFramework/PlayerController.h |
|
virtual void PawnLeavingGame() |
Clean up when a Pawn's player is leaving a game. Base implementation destroys the pawn. | GameFramework/PlayerController.h | |
void PlayDynamicForceFeedback
(
float Intensity, |
Latent action that controls the playing of force feedback Begins playing when Start is called. | GameFramework/PlayerController.h |
|
FDynamicForceFeedbackHandle PlayDynamicForceFeedback
(
float Intensity, |
Allows playing of a dynamic force feedback event from native code Begins playing when Start is called. | GameFramework/PlayerController.h | |
virtual void PlayerTick
(
float DeltaTime |
Processes player input (immediately after PlayerInput gets ticked) and calls UpdateRotation(). | GameFramework/PlayerController.h | |
void PlayHapticEffect
(
UHapticFeedbackEffect_Base* HapticEffect, |
Play a haptic feedback curve on the player's controller | GameFramework/PlayerController.h |
|
virtual bool PopInputComponent
(
UInputComponent* Input |
Removes given inputcomponent from the input stack (regardless of if it's the top, actually). | GameFramework/PlayerController.h | |
virtual void PostProcessInput
(
const float DeltaTime, |
Method called after processing input | GameFramework/PlayerController.h | |
virtual bool PostProcessWorldToScreen
(
FVector WorldLocation, |
After successful world to screen projection, allows custom post-processing of the resulting ScreenLocation. | GameFramework/PlayerController.h | |
virtual void PostSeamlessTravel() |
Called after this player controller has transitioned through seamless travel, but before that player is initialized This is called both when a new player controller is created, and when it is maintained | GameFramework/PlayerController.h | |
virtual void PreClientTravel
(
const FString& PendingURL, |
Called when the local player is about to travel to a new map or IP address. | GameFramework/PlayerController.h | |
virtual void PreProcessInput
(
const float DeltaTime, |
Method called prior to processing input | GameFramework/PlayerController.h | |
bool ProjectWorldLocationToScreen
(
FVector WorldLocation, |
Convert a World Space 3D position into a 2D Screen Space position. | GameFramework/PlayerController.h |
|
bool ProjectWorldLocationToScreenWithDistance
(
FVector WorldLocation, |
Convert a World Space 3D position into a 3D Screen Space position. | GameFramework/PlayerController.h | |
virtual void PushInputComponent
(
UInputComponent* Input |
Adds an inputcomponent to the top of the input stack. | GameFramework/PlayerController.h | |
virtual void ReceivedGameModeClass
(
TSubclassOf< class AGameModeBase > GameModeClass |
This function will be called to notify the player controller that the world has received its game class. | GameFramework/PlayerController.h | |
virtual void ReceivedPlayer() |
Called after this PlayerController's viewport/net connection is associated with this player controller. | GameFramework/PlayerController.h | |
virtual void ReceivedSpectatorClass
(
TSubclassOf< ASpectatorPawn > SpectatorClass |
Called to notify the controller that the spectator class has been received. | GameFramework/PlayerController.h | |
void RemoveFromNetConditionGroup
(
FName NetGroup |
Remove this player from a netcondition group. | GameFramework/PlayerController.h | |
virtual void ResetCameraMode() |
Reset Camera Mode to default. | GameFramework/PlayerController.h | |
void ResetControllerDeadZones() |
Resets the player's controller deadzones to default | GameFramework/PlayerController.h |
|
void ResetControllerLightColor() |
Resets the light color of the player's controller to default | GameFramework/PlayerController.h |
|
void ResetControllerTriggerReleaseThresholds() |
Resets the player's controller trigger release thresholds to default | GameFramework/PlayerController.h |
|
virtual void RestartLevel() |
Restarts the current level | GameFramework/PlayerController.h |
|
virtual void SafeRetryClientRestart() |
Call ClientRetryClientRestart, but only if the current pawn is not the currently acknowledged pawn (and throttled to avoid saturating the network). | GameFramework/PlayerController.h | |
virtual void SafeServerCheckClientPossession() |
Call ServerCheckClientPossession on the server, but only if the current pawn is not the acknowledged pawn (and throttled to avoid saturating the network). | GameFramework/PlayerController.h | |
void SafeServerUpdateSpectatorState() |
Calls ServerSetSpectatorLocation but throttles it to reduce bandwidth and only calls it when necessary. | GameFramework/PlayerController.h | |
virtual void SeamlessTravelFrom
(
APlayerController* OldPC |
Called when seamless traveling and the specified PC is being replaced by this one copy over data that should persist (not called if PlayerController is the same for the from and to GameModes) | GameFramework/PlayerController.h | |
virtual void SeamlessTravelTo
(
APlayerController* NewPC |
Called when seamless traveling and we are being replaced by the specified PC clean up any persistent state (post process chains on LocalPlayers, for example) (not called if PlayerController is the same for the from and to GameModes) | GameFramework/PlayerController.h | |
virtual void SendClientAdjustment () |
Called on server at end of tick, to let client Pawns handle updates from the server. | GameFramework/PlayerController.h | |
virtual void SendToConsole
(
const FString& Command |
Sends a command to the console to execute if not shipping version | GameFramework/PlayerController.h |
|
void ServerAcknowledgePossession
(
APawn* P |
Acknowledge possession of pawn | GameFramework/PlayerController.h |
|
virtual void ServerBlockPlayer
(
FUniqueNetIdRepl PlayerId |
Tell the client to block a player for this controller | GameFramework/PlayerController.h |
|
void ServerCamera
(
FName NewMode |
Change mode of camera | GameFramework/PlayerController.h |
|
void ServerChangeName
(
const FString& S |
Change name of server | GameFramework/PlayerController.h |
|
void ServerCheckClientPossession() |
Tells the server to make sure the possessed pawn is in sync with the client. | GameFramework/PlayerController.h |
|
void ServerCheckClientPossessionReliable() |
Reliable version of ServerCheckClientPossession to be used when there is no likely danger of spamming the network. | GameFramework/PlayerController.h |
|
void ServerExec
(
const FString& Msg |
Executes command on server (non shipping builds only) | GameFramework/PlayerController.h |
|
void ServerExecRPC
(
const FString& Msg |
RPC used by ServerExec. Not intended to be called directly | GameFramework/PlayerController.h |
|
virtual void ServerMutePlayer
(
FUniqueNetIdRepl PlayerId |
Tell the server to mute a player for this controller | GameFramework/PlayerController.h |
|
void ServerNotifyLoadedWorld
(
FName WorldPackageName |
Called to notify the server when the client has loaded a new world via seamless traveling | GameFramework/PlayerController.h |
|
void ServerPause() |
Replicate pause request to the server | GameFramework/PlayerController.h |
|
void ServerRestartPlayer() |
Attempts to restart this player, generally called from the client upon respawn request. | GameFramework/PlayerController.h |
|
void ServerSendLatestAsyncPhysicsTimestamp
(
FAsyncPhysicsTimestamp Timestamp |
Server receives the clients FAsyncPhysicsTimestamp with its predicted ServerFrame and clients LocalFrame, to updates the time dilation needed to keep the ServerFrame prediction in sync | GameFramework/PlayerController.h |
|
void ServerSetSpectatorLocation
(
FVector NewLoc, |
When spectating, updates spectator location/rotation and pings the server to make sure spectating should continue. | GameFramework/PlayerController.h |
|
void ServerSetSpectatorWaiting
(
bool bWaiting |
Indicate that the Spectator is waiting to join/respawn. | GameFramework/PlayerController.h |
|
void ServerShortTimeout() |
Notifies the server that the client has ticked gameplay code, and should no longer get the extended "still loading" timeout grace period | GameFramework/PlayerController.h |
|
void ServerToggleAILogging() |
Used by UGameplayDebuggingControllerComponent to replicate messages for AI debugging in network games. | GameFramework/PlayerController.h |
|
virtual void ServerUnblockPlayer
(
FUniqueNetIdRepl PlayerId |
Tell the client to unblock a player for this controller | GameFramework/PlayerController.h |
|
virtual void ServerUnmutePlayer
(
FUniqueNetIdRepl PlayerId |
Tell the server to unmute a player for this controller | GameFramework/PlayerController.h |
|
void ServerUpdateCamera
(
FVector_NetQuantize CamLoc, |
@TODO - combine pitch/yaw into one int, maybe also send location compressed | GameFramework/PlayerController.h |
|
void ServerUpdateLevelVisibility
(
const FUpdateLevelVisibilityLevelInfo& LevelVisibility |
Called when the client adds/removes a streamed level. | GameFramework/PlayerController.h |
|
void ServerUpdateMultipleLevelsVisibility
(
const TArray< FUpdateLevelVisibilityLevelInfo >& LevelVisibilities |
Called when the client adds/removes a streamed level. | GameFramework/PlayerController.h |
|
void ServerVerifyViewTarget() |
Used by client to request server to confirm current viewtarget (server will respond with ClientSetViewTarget() ). | GameFramework/PlayerController.h |
|
void ServerViewNextPlayer() |
Move camera to next player on round ended or spectating | GameFramework/PlayerController.h |
|
void ServerViewPrevPlayer() |
Move camera to previous player on round ended or spectating | GameFramework/PlayerController.h |
|
void ServerViewSelf
(
FViewTargetTransitionParams TransitionParams |
Move camera to current user | GameFramework/PlayerController.h |
|
void SetAsLocalPlayerController() |
Designate this player controller as local (public for GameModeBase to use, not expected to be called anywhere else) | GameFramework/PlayerController.h | |
void SetAudioListenerAttenuationOverride
(
USceneComponent* AttachToComponent, |
GameFramework/PlayerController.h |
|
|
void SetAudioListenerOverride
(
USceneComponent* AttachToComponent, |
Used to override the default positioning of the audio listener | GameFramework/PlayerController.h |
|
virtual void SetCameraMode
(
FName NewCamMode |
Set new camera mode | GameFramework/PlayerController.h | |
virtual void SetCinematicMode
(
bool bInCinematicMode, |
Adjust input based on cinematic mode | GameFramework/PlayerController.h | |
virtual void SetCinematicMode
(
bool bInCinematicMode, |
Server/SP only function for changing whether the player is in cinematic mode. | GameFramework/PlayerController.h |
|
void SetClientHandshakeId
(
uint32 InClientHandshakeId |
Associate this player controller with a connection using it's handshake cookie. | GameFramework/PlayerController.h | |
void SetControllerDeadZones
(
const float LeftDeadZone, |
Sets the deadzones of the player's controller | GameFramework/PlayerController.h |
|
void SetControllerGyroAutoCalibration
(
bool bEnabled |
Sets whether the player's controller's gyro auto calibration is enabled | GameFramework/PlayerController.h |
|
void SetControllerLightColor
(
FColor Color |
Sets the light color of the player's controller | GameFramework/PlayerController.h |
|
void SetControllerTriggerReleaseThresholds
(
const float LeftThreshold, |
Sets the trigger release thresholds of the player's controller | GameFramework/PlayerController.h |
|
void SetDeprecatedInputPitchScale
(
float NewValue |
A getter for the deprecated InputPitchScale property. | GameFramework/PlayerController.h |
|
void SetDeprecatedInputRollScale
(
float NewValue |
A getter for the deprecated InputRollScale property. | GameFramework/PlayerController.h |
|
void SetDeprecatedInputYawScale
(
float NewValue |
A getter for the deprecated InputYawScale property. | GameFramework/PlayerController.h |
|
virtual void SetDisableHaptics
(
bool bNewDisabled |
Allows the player controller to disable all haptic requests from being fired, e.g. in the case of a level loading | GameFramework/PlayerController.h |
|
void SetHapticsByValue
(
const float Frequency, |
Sets the value of the haptics for the specified hand directly, using frequency and amplitude. | GameFramework/PlayerController.h |
|
virtual void SetInputMode
(
const FInputModeDataBase& InData |
Setup an input mode. | GameFramework/PlayerController.h | |
void SetMotionControlsEnabled
(
bool bEnabled |
GameFramework/PlayerController.h |
|
|
void SetMouseCursorWidget
(
EMouseCursor::Type Cursor, |
Sets the Widget for the Mouse Cursor to display | GameFramework/PlayerController.h |
|
void SetMouseLocation
(
const int X, |
Positions the mouse cursor in screen space, in pixels. | GameFramework/PlayerController.h |
|
virtual void SetName
(
const FString& S |
Tries to set the player's name to the given name. | GameFramework/PlayerController.h |
|
void SetNetSpeed
(
int32 NewSpeed |
Store the net speed | GameFramework/PlayerController.h | |
virtual bool SetPause
(
bool bPause, |
Locally try to pause game (call serverpause to pause network game); returns success indicator. | GameFramework/PlayerController.h | |
virtual void SetPlayer
(
UPlayer* InPlayer |
Associate a new UPlayer with this PlayerController. | GameFramework/PlayerController.h | |
void SetShowMouseCursor
(
bool bShow |
GameFramework/PlayerController.h | ||
void SetTargetViewRotation
(
const FRotator& InRotation |
Setter for TargetViewRotation. | GameFramework/PlayerController.h | |
virtual void SetViewTarget
(
AActor* NewViewTarget, |
Set the view target | GameFramework/PlayerController.h | |
virtual void SetViewTargetWithBlend
(
AActor* NewViewTarget, |
Set the view target blending with variable control | GameFramework/PlayerController.h |
|
virtual void SetVirtualJoystickVisibility
(
bool bVisible |
Set the virtual joystick visibility. | GameFramework/PlayerController.h |
|
virtual bool ShouldFlushKeysWhenViewportFocusChanges () |
If true, then the GameViewportClient should call FlushPressedKeys on this controller when it loses focus. | GameFramework/PlayerController.h | |
bool ShouldPerformFullTickWhenPaused() |
Returns true if we fully tick when paused (and if our tick function is enabled when paused). | GameFramework/PlayerController.h | |
virtual bool ShouldShowMouseCursor() |
Returns true if the mouse cursor should be shown | GameFramework/PlayerController.h | |
virtual void SmoothTargetViewRotation
(
APawn* TargetPawn, |
Called client-side to smoothly interpolate received TargetViewRotation (result is in BlendedTargetViewRotation) | GameFramework/PlayerController.h | |
virtual void SpawnDefaultHUD() |
Spawn a HUD (make sure that PlayerController always has valid HUD, even if ClientSetHUD() hasn't been called | GameFramework/PlayerController.h | |
virtual void SpawnPlayerCameraManager() |
Spawn cameras for servers and owning players | GameFramework/PlayerController.h | |
virtual void StartFire
(
uint8 FireModeNum |
Fire the player's currently selected weapon with the optional firemode. | GameFramework/PlayerController.h |
|
virtual void StartSpectatingOnly() |
Start spectating mode, as the only mode allowed. | GameFramework/PlayerController.h | |
void StartTalking() |
Enable voice chat transmission | GameFramework/PlayerController.h | |
void StopHapticEffect
(
EControllerHand Hand |
Stops a playing haptic feedback curve | GameFramework/PlayerController.h |
|
void StopTalking() |
Disable voice chat transmission | GameFramework/PlayerController.h | |
virtual bool StreamingSourceShouldActivate () |
Whether the PlayerController streaming source should activate cells after loading. | GameFramework/PlayerController.h |
|
virtual bool StreamingSourceShouldBlockOnSlowStreaming () |
Whether the PlayerController streaming source should block on slow streaming. | GameFramework/PlayerController.h |
|
virtual void SwitchLevel
(
const FString& URL |
SwitchLevel to the given MapURL. | GameFramework/PlayerController.h |
|
virtual void ToggleSpeaking
(
bool bInSpeaking |
Toggle voice chat on and off | GameFramework/PlayerController.h |
|
virtual void UnFreeze() |
Timer used by RoundEnded and Inactive states to accept player input again | GameFramework/PlayerController.h | |
virtual void UpdateCameraManager
(
float DeltaSeconds |
Update the camera manager; this is called after all actors have been ticked. | GameFramework/PlayerController.h | |
virtual void UpdateHiddenActors
(
const FVector& ViewLocation |
Builds a list of actors that are hidden based upon gameplay | GameFramework/PlayerController.h | |
virtual void UpdateHiddenComponents
(
const FVector& ViewLocation, |
Builds a list of components that are hidden based upon gameplay | GameFramework/PlayerController.h | |
virtual void UpdatePing
(
float InPing |
Takes ping updates from the net driver (both clientside and serverside), and passes them on to PlayerState::UpdatePing | GameFramework/PlayerController.h | |
virtual void UpdateRotation
(
float DeltaTime |
Updates the rotation of player, based on ControlRotation after RotationInput has been applied. | GameFramework/PlayerController.h | |
void UpdateServerAsyncPhysicsTickOffset() |
Update the tick offset in between the local client and the server | GameFramework/PlayerController.h | |
virtual void ViewAPlayer
(
int32 dir |
View next active player in PlayerArray. | GameFramework/PlayerController.h | |
bool WasInputKeyJustPressed
(
FKey Key |
Returns true if the given key/button was up last frame and down this frame. | GameFramework/PlayerController.h |
|
bool WasInputKeyJustReleased
(
FKey Key |
Returns true if the given key/button was down last frame and up this frame. | GameFramework/PlayerController.h |
|
Overridden from AController
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginInactiveState() |
State entered when inactive (no possessed pawn, not spectating, etc). | GameFramework/PlayerController.h | |
virtual void ChangeState
(
FName NewState |
Change the current state to named state | GameFramework/PlayerController.h | |
virtual void CleanupPlayerState() |
Called from Destroyed(). Cleans up PlayerState. | GameFramework/PlayerController.h | |
virtual void DisplayDebug
(
UCanvas* Canvas, |
GameFramework/PlayerController.h | ||
virtual void EndInactiveState() |
Called when leaving the inactive state | GameFramework/PlayerController.h | |
virtual void FailedToSpawnPawn() |
GameMode failed to spawn pawn for me. | GameFramework/PlayerController.h | |
virtual void GameHasEnded
(
AActor* EndGameFocus, |
Called from game mode upon end of the game, used to transition to proper state. | GameFramework/PlayerController.h | |
virtual void GetPlayerViewPoint
(
FVector& Location, |
Returns Player's Point of View For the AI this means the Pawn's 'Eyes' ViewPoint For a Human player, this means the Camera's ViewPoint | GameFramework/PlayerController.h | |
virtual AActor * GetViewTarget() |
Get the actor the controller is looking at | GameFramework/PlayerController.h | |
virtual bool IsLocalController() |
Returns whether this Controller is a local controller. | GameFramework/PlayerController.h | |
virtual void ResetIgnoreInputFlags() |
Reset move and look input ignore flags to defaults | GameFramework/PlayerController.h | |
virtual void SetInitialLocationAndRotation
(
const FVector& NewLocation, |
Set the initial location and rotation of the controller, as well as the control rotation. | GameFramework/PlayerController.h | |
virtual void SetPawn
(
APawn* InPawn |
Setter for Pawn. Normally should only be used internally when possessing/unpossessing a Pawn. | GameFramework/PlayerController.h | |
virtual bool ShouldParticipateInSeamlessTravel() |
Whether this controller should persist through seamless travel Player controllers should always be included in seamless travel | GameFramework/PlayerController.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CalcCamera
(
float DeltaTime, |
Calculate camera view point, when viewing this actor. | GameFramework/PlayerController.h | |
virtual void Destroyed() |
Called when this actor is explicitly being destroyed during gameplay or in the editor, not called during level streaming or gameplay ending | GameFramework/PlayerController.h | |
virtual bool DestroyNetworkActorHandled() |
Called by DestroyActor(), gives actors a chance to op out of actor destruction Used by network code to have the net connection timeout/cleanup first | GameFramework/PlayerController.h | |
virtual void DisableInput
(
APlayerController* PlayerController |
Removes this actor from the stack of input being handled by a PlayerController. | GameFramework/PlayerController.h | |
virtual void EnableInput
(
APlayerController* PlayerController |
Pushes this actor on to the stack of input being handled by a PlayerController. | GameFramework/PlayerController.h | |
virtual void EndPlay
(
const EEndPlayReason::Type EndPlayReason |
Overridable function called whenever this actor is being removed from a level | GameFramework/PlayerController.h | |
virtual void FellOutOfWorld
(
const UDamageType& dmgType |
Called when the actor falls out of the world 'safely' (below KillZ and such) | GameFramework/PlayerController.h | |
virtual void GetActorEyesViewPoint
(
FVector& OutLocation, |
Returns the point of view of the actor. | GameFramework/PlayerController.h | |
virtual UNetConnection * GetNetConnection() |
Get the owning connection used for communicating between client/server | GameFramework/PlayerController.h | |
virtual const AActor * GetNetOwner() |
Return the actor responsible for replication, if any. Typically the player controller | GameFramework/PlayerController.h | |
virtual UPlayer * GetNetOwningPlayer () |
Return the owning UPlayer (if any) of this actor if it's role is ROLE_Authority. | GameFramework/PlayerController.h | |
virtual UPlayer * GetNetOwningPlayerAnyRole () |
Return the owning UPlayer (if any) of this actor, regardless of it's current role. | GameFramework/PlayerController.h | |
virtual float GetNetPriority
(
const FVector& ViewPos, |
Function used to prioritize actors when deciding which to replicate | GameFramework/PlayerController.h | |
| Checks to see if this actor is relevant for a specific network connection | GameFramework/PlayerController.h | ||
virtual void OnActorChannelOpen
(
FInBunch& InBunch, |
Allows for a specific response from the actor when the actor channel is opened (client side) | GameFramework/PlayerController.h | |
virtual void OnNetCleanup
(
UNetConnection* Connection |
Handles cleaning up the associated Actor when killing the connection | GameFramework/PlayerController.h | |
virtual void OnSerializeNewActor
(
FOutBunch& OutBunch |
SerializeNewActor has just been called on the actor before network replication (server side) | GameFramework/PlayerController.h | |
virtual void PostInitializeComponents() |
Overridden to create the player replication info and perform other mundane initialization tasks. | GameFramework/PlayerController.h | |
virtual void Reset() |
Reset actor to initial state - used when restarting level without reloading. | GameFramework/PlayerController.h | |
virtual void TickActor
(
float DeltaTime, |
Dispatches the once-per frame Tick() function for this actor | GameFramework/PlayerController.h | |
virtual bool UseShortConnectTimeout() |
Used by the net connection to determine if a net owning actor should switch to using the shortened timeout value | GameFramework/PlayerController.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void GetLifetimeReplicatedProps
(
TArray< FLifetimeProperty >& OutLifetimeProps |
Returns the properties used for network replication, this needs to be overridden by all actor classes with native replicated properties | GameFramework/PlayerController.h | |
virtual void PostLoad() |
GameFramework/PlayerController.h | ||
virtual void Serialize
(
FArchive& Ar |
GameFramework/PlayerController.h |
Overridden from IWorldPartitionStreamingSourceProvider
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool GetStreamingSources
(
TArray< FWorldPartitionStreamingSource >& OutStreamingSources |
Gets the PlayerController's streaming sources | GameFramework/PlayerController.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginPlayingState () |
Pawn has been possessed, so changing state to NAME_Playing. | GameFramework/PlayerController.h | |
virtual void BeginSpectatingState() |
Event when spectating begins. | GameFramework/PlayerController.h | |
virtual void BuildInputStack
(
TArray< UInputComponent* >& InputStack |
GameFramework/PlayerController.h | ||
virtual TSharedPtr< class SVirtualJoystick > CreateVirtualJoystick() |
Create virtual touch interface | GameFramework/PlayerController.h | |
virtual void DestroySpectatorPawn() |
Destroys the SpectatorPawn and sets it to nullptr. | GameFramework/PlayerController.h | |
virtual void EndPlayingState() |
Leave playing state. | GameFramework/PlayerController.h | |
virtual void EndSpectatingState() |
Event when no longer spectating. | GameFramework/PlayerController.h | |
virtual ACameraActor * GetAutoActivateCameraForPlayer() |
GameFramework/PlayerController.h | ||
virtual int32 GetInputIndex() |
GameFramework/PlayerController.h | ||
virtual bool GetStreamingSourcesInternal
(
TArray< FWorldPartitionStreamingSource >& OutStreamingSources |
GameFramework/PlayerController.h | ||
virtual bool IsInViewportClient
(
UGameViewportClient* ViewportClient |
GameFramework/PlayerController.h | ||
void ProcessForceFeedbackAndHaptics
(
const float DeltaTime, |
GameFramework/PlayerController.h | ||
virtual void ProcessPlayerInput
(
const float DeltaTime, |
GameFramework/PlayerController.h | ||
virtual void ProcessTouchHitResult
(
const FInputDeviceId DeviceId, |
GameFramework/PlayerController.h | ||
virtual void SetSpawnLocation
(
const FVector& NewLocation |
Set the SpawnLocation for use when changing states or when there is no pawn or spectator. | GameFramework/PlayerController.h | |
virtual void SetSpectatorPawn
(
ASpectatorPawn* NewSpectatorPawn |
Set the spectator pawn. | GameFramework/PlayerController.h | |
virtual void SetupInactiveStateInputComponent
(
UInputComponent* InComponent |
Sets up input bindings for the input component pushed on the stack in the inactive state. | GameFramework/PlayerController.h | |
virtual void SetupInputComponent() |
Allows the PlayerController to set up custom input bindings. | GameFramework/PlayerController.h | |
virtual bool ShouldKeepCurrentPawnUponSpectating() |
Useful to spectate other pawn without un-possessing the current pawn | GameFramework/PlayerController.h | |
virtual ASpectatorPawn * SpawnSpectatorPawn () |
Spawn a SpectatorPawn to use as a spectator and initialize it. | GameFramework/PlayerController.h | |
void TickPlayerInput
(
const float DeltaSeconds, |
Internal. | GameFramework/PlayerController.h | |
virtual void UpdateForceFeedback
(
IInputInterface* InputInterface, |
GameFramework/PlayerController.h | ||
virtual void UpdateStateInputComponents() |
Refresh state specific input components | GameFramework/PlayerController.h |
Overridden from AController
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnPossess
(
APawn* InPawn |
Overridable native function for when this controller is asked to possess a pawn. | GameFramework/PlayerController.h | |
virtual void OnUnPossess() |
Overridable native function for when this controller unpossesses its pawn. | GameFramework/PlayerController.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginPlay() |
Overridable native event for when play begins for this actor. | GameFramework/PlayerController.h | |
virtual bool HasNetOwner() |
Overridden to return that player controllers are capable of RPCs | GameFramework/PlayerController.h |
Overridden from IWorldPartitionStreamingSourceProvider
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool GetStreamingSource
(
FWorldPartitionStreamingSource& OutStreamingSource |
GameFramework/PlayerController.h | ||
virtual const UObject * GetStreamingSourceOwner() |
GameFramework/PlayerController.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| InputPitchScale_DEPRECATED | float | Pitch input speed scaling | GameFramework/PlayerController.h |
|
| InputRollScale_DEPRECATED | float | Roll input speed scaling | GameFramework/PlayerController.h |
|
| InputYawScale_DEPRECATED | float | Yaw input speed scaling | GameFramework/PlayerController.h |
|