Navigation
Unreal Engine C++ API Reference > Runtime > Engine > GameFramework
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- AActor
- AController
- APlayerController
- ADebugCameraController
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerController.h |
Include | #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
Remarks
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.
Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
TObjectPtr< APawn > | AcknowledgedPawn | Used in net games so client can acknowledge it possessed a specific pawn. |
![]() ![]() ![]() |
TArray< FActiveForceFeedbackEffect > | ActiveForceFeedbackEffects | |
![]() |
TSharedPtr< struct FActiveHapticFeedbackEffect > | ActiveHapticEffect_Gun | |
![]() |
TSharedPtr< struct FActiveHapticFeedbackEffect > | ActiveHapticEffect_HMD | |
![]() |
TSharedPtr< struct FActiveHapticFeedbackEffect > | ActiveHapticEffect_Left | Currently playing haptic effects for both the left and right hand |
![]() |
TSharedPtr< struct FActiveHapticFeedbackEffect > | ActiveHapticEffect_Right | |
![]() |
TWeakObjectPtr< USceneComponent > | AudioListenerAttenuationComponent | Component that is used to only override where attenuation calculations are computed from. |
![]() |
FVector | AudioListenerAttenuationOverride | Currently overridden vector used to do attenuation calculations for listener. |
![]() |
TWeakObjectPtr< USceneComponent > | AudioListenerComponent | Component that is currently driving the audio listener position/orientation |
![]() |
FVector | AudioListenerLocationOverride | Currently overridden location of audio listener |
![]() |
FRotator | AudioListenerRotationOverride | Currently overridden rotation of audio listener |
![]() ![]() ![]() |
bool | bAutoManageActiveCameraTarget | True to allow this player controller to manage the camera target for you, typically by using the possessed pawn as the camera target. |
![]() |
uint32: 1 | bCinemaDisableInputLook | |
![]() |
uint32: 1 | bCinemaDisableInputMove | The state of the inputs from cinematic mode |
![]() |
uint32: 1 | bCinematicMode | Is this player currently in cinematic mode? Prevents rotation/movement/firing/etc |
![]() ![]() ![]() ![]() |
uint32: 1 | bEnableClickEvents | Whether actor/component click events should be generated. |
![]() ![]() ![]() ![]() ![]() |
uint32: 1 | bEnableMotionControls | Whether or not to consider input from motion sources (tilt, acceleration, etc) |
![]() ![]() ![]() ![]() |
uint32: 1 | bEnableMouseOverEvents | Whether actor/component mouse over events should be generated. |
![]() ![]() ![]() ![]() |
uint32: 1 | bEnableStreamingSource | Whether the PlayerController should be used as a World Partiton streaming source. |
![]() ![]() ![]() ![]() |
uint32: 1 | bEnableTouchEvents | Whether actor/component touch events should be generated. |
![]() ![]() ![]() ![]() |
uint32: 1 | bEnableTouchOverEvents | Whether actor/component touch over events should be generated. |
![]() |
bool | bFault | |
![]() ![]() ![]() ![]() |
uint32: 1 | bForceFeedbackEnabled | |
![]() |
uint32: 1 | bHidePawnInCinematicMode | When cinematic mode is true, signifies that this controller's pawn should be hidden |
![]() |
uint32: 1 | bIsUsingStreamingVolumes | Whether this controller is using streaming volumes. |
![]() |
FRotator | BlendedTargetViewRotation | Smoothed version of TargetViewRotation to remove jerkiness from intermittent replication updates. |
![]() |
uint32: 1 | bOverrideAudioAttenuationListener | Whether to override the attenuation listener position. |
![]() |
uint32: 1 | bOverrideAudioListener | Whether to override the normal audio listener positioning method |
![]() ![]() ![]() ![]() ![]() |
uint32: 1 | bPlayerIsWaiting | True if PlayerController is currently waiting for the match to start or to respawn. |
![]() |
bool | bRenderPrimitiveComponents | Whether to render primitives component. |
![]() |
uint32: 1 | bShortConnectTimeOut | When true, reduces connect timeout from InitialConnectionTimeOut to ConnectionTimeout. |
![]() ![]() ![]() ![]() |
uint32: 1 | bShouldPerformFullTickWhenPaused | Whether we fully tick when the game is paused, if our tick function is allowed to do so. |
![]() ![]() ![]() ![]() |
uint32: 1 | bShowMouseCursor | Whether the mouse cursor should be displayed. |
![]() ![]() ![]() ![]() |
uint32: 1 | bStreamingSourceShouldActivate | Whether the PlayerController streaming source should activate cells after loading. |
![]() ![]() ![]() ![]() |
uint32: 1 | bStreamingSourceShouldBlockOnSlowStreaming | Whether the PlayerController streaming source should block on slow streaming. |
![]() |
TStaticArray< TArray< uint8 >, 16 > | Buffer | |
![]() ![]() ![]() ![]() |
TSubclassOf< UCheatManager > | CheatClass | Class of my CheatManager. |
![]() ![]() ![]() ![]() ![]() |
TObjectPtr< UCheatManager > | CheatManager | Object that manages "cheat" commands. |
![]() ![]() ![]() ![]() |
TArray< FKey > | ClickEventKeys | List of keys that will cause click events to be forwarded, default to left click |
![]() ![]() |
int32 | ClientCap | Cap set by server on bandwidth from client to server in bytes/sec (only has impact if >=2600) |
![]() |
TWeakObjectPtr< UPrimitiveComponent > | CurrentClickablePrimitive | Clickable object currently under the mouse cursor. |
![]() ![]() ![]() ![]() |
TEnumAsByte< ECollisionChannel > | CurrentClickTraceChannel | Trace channel currently being used for determining what world object was clicked on. |
![]() |
TArray< TWeakObjectPtr< UInputComponent > > | CurrentInputStack | Internal. Current stack of InputComponents. |
![]() ![]() ![]() ![]() |
TEnumAsByte< EMouseCursor::Type > | CurrentMouseCursor | Currently visible mouse cursor |
![]() |
TWeakObjectPtr< UPrimitiveComponent >[EKeys::NUM_TOUCH_KEYS] | CurrentTouchablePrimitives | Touchable objects currently under fingers. |
![]() ![]() |
TObjectPtr< class UTouchInterface > | CurrentTouchInterface | The currently set touch interface |
![]() ![]() ![]() ![]() |
TEnumAsByte< ECollisionChannel > | DefaultClickTraceChannel | Default trace channel used for determining what world object was clicked on. |
![]() ![]() ![]() ![]() |
TEnumAsByte< EMouseCursor::Type > | DefaultMouseCursor | Type of mouse cursor to show by default |
![]() |
PRAGMA_ENABLE_DEPRECATION_WARNINGS | FClientFrameInfo | Client |
![]() |
FInputCmdBuffer | DEPRECATED 5.4, physics frame offset and time dilation handled via ClientAckTimeDilation() and ClientSetupAsyncPhysicsTimestamp() Frame number exchange. | |
![]() |
TArray< FForceFeedbackEffectHistoryEntry > | ForceFeedbackEffectHistoryEntries | For debugging, shows the last force feeback effects that played |
![]() ![]() ![]() |
float | ForceFeedbackScale | Scale applied to force feedback values |
![]() |
FForceFeedbackValues | ForceFeedbackValues | Currently active force feedback weights |
![]() |
PRAGMA_ENABLE_DEPRECATION_WARNINGS | FServerFrameInfo | Server |
![]() ![]() |
TArray< TObjectPtr< class AActor > > | HiddenActors | The actors which the camera shouldn't see - e.g. used to hide actors which the camera penetrates |
![]() ![]() |
TArray< TWeakObjectPtr< UPrimitiveComponent > > | HiddenPrimitiveComponents | Explicit components the camera shouldn't see (helpful for external systems to hide a component from a single player) |
![]() ![]() ![]() ![]() |
float | HitResultTraceDistance | Distance to trace when computing click events |
![]() ![]() |
TObjectPtr< UInputComponent > | InactiveStateInputComponent | InputComponent we use when player is in Inactive state. |
![]() ![]() |
uint16 | LastCompletedSeamlessTravelCount | The value of SeamlessTravelCount, upon the last call to GameModeBase::HandleSeamlessTravelPlayer; used to detect seamless travel |
![]() |
int32 | LastLocalFrame | |
![]() |
float | LastMovementHitch | Last real time (undilated) a hitch was detected in TickActor() when checking for forced client movement updates. |
![]() |
float | LastMovementUpdateTime | Last real time (undilated) recorded in TickActor() when checking for forced client movement updates. |
![]() |
int32 | LastProcessedInputFrame | |
![]() |
int32 | LastRecvServerFrame | |
![]() |
int32 | LastSentLocalFrame | |
![]() ![]() |
float | LastSpectatorStateSynchTime | Used to make sure the client is kept synchronized when in a spectator state |
![]() ![]() ![]() |
FVector | LastSpectatorSyncLocation | Last location synced on the server for a spectator. |
![]() ![]() ![]() |
FRotator | LastSpectatorSyncRotation | Last rotation synced on the server for a spectator. |
![]() |
float | LocalPlayerCachedLODDistanceFactor | Last used FOV based multiplier to distance to an object when determining if it exceeds the object's cull distance |
![]() |
FPlayerMuteList | MuteList | List of muted players in various categories |
![]() ![]() |
TObjectPtr< AHUD > | MyHUD | Heads up display associated with this PlayerController. |
![]() ![]() ![]() |
TObjectPtr< UNetConnection > | NetConnection | The net connection this controller is communicating on, nullptr for local players on server |
![]() ![]() ![]() |
uint8 | NetPlayerIndex | 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 |
![]() ![]() ![]() |
TSubclassOf< UPlayerInput > | OverridePlayerInputClass | If set, then this UPlayerInput class will be used instead of the Input Settings' DefaultPlayerInputClass |
![]() |
TArray< FName > | PendingMapChangeLevelNames | List of names of levels the server is in the middle of sending us for a PrepareMapChange() call |
![]() ![]() ![]() |
TObjectPtr< UNetConnection > | PendingSwapConnection | 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) |
![]() ![]() |
TObjectPtr< UPlayer > | Player | UPlayer associated with this PlayerController. |
![]() ![]() ![]() ![]() |
TObjectPtr< APlayerCameraManager > | PlayerCameraManager | Camera/view related variables Camera manager associated with this Player Controller. |
![]() ![]() ![]() ![]() |
TSubclassOf< APlayerCameraManager > | PlayerCameraManagerClass | PlayerCamera class should be set for each game, otherwise Engine.PlayerCameraManager is used |
![]() ![]() ![]() |
TObjectPtr< UPlayerInput > | PlayerInput | Object that manages player input. |
![]() |
PRAGMA_ENABLE_DEPRECATION_WARNINGS | ||
![]() |
int8 | QuantizedTimeDilation | |
![]() |
FRotator | RotationInput | Input axes values, accumulated each tick. |
![]() ![]() |
uint16 | SeamlessTravelCount | Counter for this players seamless travels (used along with the below value, to restrict ServerNotifyLoadedWorld) |
![]() ![]() ![]() ![]() |
float | SmoothTargetViewRotationSpeed | Interp speed for blending remote view rotation for smoother client updates |
![]() ![]() ![]() |
FVector | SpawnLocation | The location used internally when there is no pawn or spectator, to know where to spawn the spectator or focus the camera on death. |
![]() ![]() ![]() ![]() |
FColor | StreamingSourceDebugColor | Color used for debugging. |
![]() ![]() ![]() ![]() |
EStreamingSourcePriority | StreamingSourcePriority | PlayerController streaming source priority. |
![]() ![]() ![]() ![]() |
TArray< FStreamingSourceShape > | StreamingSourceShapes | Optional aggregated shape list used to build a custom shape for the streaming source. |
![]() |
float | TargetNumBufferedCmds | |
![]() |
float | TargetTimeDilation | |
![]() ![]() ![]() |
FRotator | TargetViewRotation | Used to replicate the view rotation of targets not owned/possessed by this PlayerController. |
![]() |
FTimerHandle | TimerHandle_UnFreeze | Handle for efficient management of UnFreeze timer |
![]() |
TSharedPtr< class SVirtualJoystick > | VirtualJoystick | The virtual touch interface |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
APlayerController
(
const FObjectInitializer& ObjectInitializer |
Default Constructor |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
|||
![]() |
|||
![]() |
|||
![]() ![]() |
void | AcknowledgePossession
(
APawn* P |
Called on the client to do local pawn setup after possession, before calling ServerAcknowledgePossession |
![]() ![]() ![]() ![]() |
void | ActivateTouchInterface
(
UTouchInterface* NewTouchInterface |
Activates a new touch interface for this player controller |
![]() ![]() |
void | AddCheats
(
bool bForce |
Called to try and enable cheats for this player, happens during initialization or from AllowCheats command |
![]() ![]() ![]() ![]() |
void | AddPitchInput
(
float Val |
Add Pitch (look up) input. This value is multiplied by InputPitchScale. |
![]() ![]() ![]() ![]() |
void | AddRollInput
(
float Val |
Add Roll input. This value is multiplied by InputRollScale. |
![]() ![]() ![]() ![]() |
void | AddYawInput
(
float Val |
Add Yaw (turn) input. This value is multiplied by InputYawScale. |
![]() ![]() |
void | AutoManageActiveCameraTarget
(
AActor* SuggestedTarget |
If bAutoManageActiveCameraTarget is true, then automatically manage the active camera target. |
![]() ![]() |
void | Pawn has been possessed, so changing state to NAME_Playing. | |
![]() ![]() |
void | Event when spectating begins. | |
![]() |
void | BuildHiddenComponentList
(
const FVector& ViewLocation, |
Builds a list of components that are hidden based upon gameplay. |
![]() ![]() |
void | BuildInputStack
(
TArray< UInputComponent* >& InputStack |
|
![]() ![]() ![]() ![]() |
void | Change Camera mode | |
![]() ![]() ![]() ![]() |
bool | Returns true if this controller thinks it's able to restart. | |
![]() ![]() |
void | Clears out 'left-over' audio components. | |
![]() ![]() |
void | Gives the PlayerController an opportunity to cleanup any changes it applied to the game viewport, primarily for the touch interface | |
![]() ![]() ![]() |
void | ||
![]() ![]() ![]() |
void | Clear any overrides that have been applied to audio listener | |
![]() ![]() ![]() |
void | ClientAckTimeDilation
(
float TimeDilation, |
Client receives the time dilation value it needs to use to keep its ServerFrame to LocalFrame offset in sync |
![]() ![]() ![]() |
void | ClientAckUpdateLevelVisibility
(
FName PackageName, |
Acknowledge received LevelVisibilityTransactionId |
![]() ![]() ![]() ![]() |
void | ClientAddTextureStreamingLoc
(
FVector InLoc, |
Adds a location to the texture streaming system for the specified duration. |
![]() ![]() ![]() |
void | Tells client to cancel any pending map change. | |
![]() ![]() ![]() |
void | ClientCapBandwidth
(
int32 Cap |
Set CurrentNetSpeed to the lower of its current value and Cap. |
![]() ![]() ![]() ![]() ![]() |
void | Removes all Camera Lens Effects. | |
![]() ![]() ![]() |
void | Actually performs the level transition prepared by PrepareMapChange(). | |
![]() ![]() ![]() ![]() |
void | ClientEnableNetworkVoice
(
bool bEnable |
Tell the client to enable or disable voice chat (not muting) |
![]() ![]() ![]() |
void | Notify client that the session is about to start | |
![]() ![]() ![]() ![]() |
void | 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 | |
![]() ![]() ![]() |
void | Forces GC at the end of the tick on the client | |
![]() ![]() ![]() |
void | ClientGameEnded
(
AActor* EndGameFocus, |
Replicated function called by GameHasEnded(). |
![]() ![]() ![]() |
void | ClientGotoState
(
FName NewState |
Server uses this to force client into NewState . |
![]() ![]() ![]() |
void | ClientIgnoreLookInput
(
bool bIgnore |
Calls IgnoreLookInput on client |
![]() ![]() ![]() |
void | ClientIgnoreMoveInput
(
bool bIgnore |
Calls IgnoreMoveInput on client |
![]() ![]() ![]() |
void | ClientMessage
(
const FString& S, |
Outputs a message to HUD |
![]() ![]() ![]() ![]() |
void | ClientMutePlayer
(
FUniqueNetIdRepl PlayerId |
Tell the client to mute a player for this controller |
![]() |
void | ClientPlayForceFeedback
(
UForceFeedbackEffect* ForceFeedbackEffect, |
Play a force feedback pattern on the player's controller |
![]() ![]() ![]() |
void | ClientPlaySound
(
USoundBase* Sound, |
Play sound client-side (so only the client will hear it) |
![]() ![]() ![]() |
void | ClientPlaySoundAtLocation
(
USoundBase* Sound, |
Play sound client-side at the specified location |
![]() ![]() ![]() |
void | ClientPrepareMapChange
(
FName LevelName, |
Asynchronously loads the given level in preparation for a streaming map transition. |
![]() ![]() ![]() |
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. |
![]() ![]() ![]() |
void | ClientReceiveLocalizedMessage
(
TSubclassOf< ULocalMessage > Message, |
Send client localized message id |
![]() ![]() ![]() |
void | ClientRecvServerAckFrame
(
int32 LastProcessedInputFrame, |
We call this in SendClientAdjustment to tell the client what the last processed input frame was for it and on what local frame number it was processed |
![]() ![]() ![]() |
void | ClientRecvServerAckFrameDebug
(
uint8 NumBuffered, |
|
![]() ![]() ![]() ![]() |
void | ClientRepObjRef
(
UObject* Object |
Development RPC for testing object reference replication |
![]() ![]() ![]() |
void | ClientReset () |
Tell client to reset the PlayerController |
![]() ![]() ![]() |
void | ClientRestart
(
APawn* NewPawn |
Tell client to restart the level |
![]() ![]() ![]() |
void | ClientRetryClientRestart
(
APawn* NewPawn |
Assign Pawn to player, but avoid calling ClientRestart if we have already accepted this pawn |
![]() ![]() ![]() ![]() |
void | ClientReturnToMainMenuWithTextReason
(
const FText& ReturnReason |
Return the client to the main menu gracefully |
![]() ![]() ![]() |
void | Tells the client to block until all pending level streaming actions are complete. | |
![]() ![]() ![]() |
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. |
![]() ![]() ![]() |
void | ClientSetCameraMode
(
FName NewCamMode |
Replicated function to set camera style on client |
![]() ![]() ![]() |
void | ClientSetCinematicMode
(
bool bInCinematicMode, |
Called by the server to synchronize cinematic transitions with the client |
![]() ![]() ![]() |
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. |
![]() ![]() ![]() ![]() |
void | ClientSetHUD
(
TSubclassOf< AHUD > NewHUDClass |
Set the client's class of HUD and spawns a new instance of it. |
![]() ![]() ![]() ![]() |
void | ClientSetSpectatorWaiting
(
bool bWaiting |
Indicate that the Spectator is waiting to join/respawn. |
![]() ![]() ![]() |
void | ClientSetupNetworkPhysicsTimestamp
(
FAsyncPhysicsTimestamp Timestamp |
Client receives the setup of the FAsyncPhysicsTimestamp ServerFrame and LocalFrame offset from the server. |
![]() ![]() ![]() |
void | ClientSetViewTarget
(
AActor* A, |
Set the view target |
![]() ![]() ![]() ![]() |
void | ClientSpawnCameraLensEffect
(
TSubclassOf< class AEmitterCameraLensEffectBase > LensEffectEmitterClass |
|
![]() ![]() ![]() ![]() |
void | ClientSpawnGenericCameraLensEffect
(
UPARAM(meta=(MustImplement="CameraLensEffectInterface")) TSubclassOf< class AActor > LensEffectEmitt... |
Spawn a camera lens effect (e.g. blood). |
![]() ![]() ![]() ![]() |
void | ClientStartCameraShake
(
TSubclassOf< class UCameraShakeBase > Shake, |
Play Camera Shake |
![]() ![]() ![]() |
void | ClientStartCameraShakeFromSource
(
TSubclassOf< class UCameraShakeBase > Shake, |
Play Camera Shake localized to a given source |
![]() ![]() ![]() |
void | Notify client that the session is starting | |
![]() ![]() ![]() ![]() |
void | ClientStopCameraShake
(
TSubclassOf< class UCameraShakeBase > Shake, |
Stop camera shake on client. |
![]() ![]() ![]() |
void | ClientStopCameraShakesFromSource
(
UCameraShakeSourceComponent* SourceComponent, |
Stop camera shake on client. |
![]() ![]() ![]() ![]() |
void | ClientStopForceFeedback
(
UForceFeedbackEffect* ForceFeedbackEffect, |
Stops a playing force feedback pattern |
![]() ![]() ![]() |
void | ClientTeamMessage
(
APlayerState* SenderPlayerState, |
|
![]() ![]() |
void | ClientTravel
(
const FString& URL, |
Travel to a different map or IP address. |
![]() ![]() ![]() |
void | ClientTravelInternal
(
const FString& URL, |
Internal clientside implementation of ClientTravel - use ClientTravel to call this |
![]() ![]() ![]() ![]() |
void | ClientUnmutePlayer
(
FUniqueNetIdRepl PlayerId |
Tell the client to unmute a player for this controller |
![]() ![]() ![]() ![]() |
void | ClientUnmutePlayers
(
const TArray< FUniqueNetIdRepl >& PlayerIds |
Tell the client to unmute an array of players for this controller |
![]() ![]() ![]() |
void | ClientUpdateLevelStreamingStatus
(
FName PackageName, |
Replicated Update streaming status |
![]() ![]() ![]() |
void | ClientUpdateMultipleLevelsStreamingStatus
(
const TArray< FUpdateLevelStreamingLevelStatus >& LevelStatuses |
Replicated Update streaming status. |
![]() ![]() ![]() ![]() |
void | Tells the client that the server has all the information it needs and that it is ok to start sending voice packets. | |
![]() ![]() ![]() |
void | ClientWasKicked
(
const FText& KickReason |
Notify client they were kicked from the server |
![]() ![]() |
FString | ConsoleCommand
(
const FString& Command, |
Executes the Exec() command on the UPlayer object |
![]() ![]() ![]() ![]() |
void | ConsoleKey
(
FKey Key |
Console control commands, useful when remote debugging so you can't touch the console the normal way |
![]() ![]() |
void | Create the touch interface, and activate an initial touch interface (if touch interface is desired) | |
![]() ![]() |
TSharedPtr< class SVirtualJoystick > | Create virtual touch interface | |
![]() ![]() |
bool | Default implementation of pausing check for 'CanUnpause' delegates | |
![]() ![]() |
void | Used to wait until a map change can be prepared when one was already in progress | |
![]() ![]() ![]() ![]() |
bool | DeprojectMousePositionToWorld
(
FVector& WorldLocation, |
Convert current mouse 2D position to World Space 3D position and direction. |
![]() ![]() ![]() ![]() |
bool | DeprojectScreenPositionToWorld
(
float ScreenX, |
Convert 2D screen position to World Space 3D position and direction. |
![]() ![]() |
void | Destroys the SpectatorPawn and sets it to nullptr. | |
![]() ![]() ![]() ![]() |
void | EnableCheats () |
Run from the console to try and manually enable cheats which are disabled by default in multiplayer, games can override this |
![]() |
void | EnableNetworkedPhysicsInputSync
(
bool EnablePrediction |
|
![]() ![]() |
void | Leave playing state. | |
![]() ![]() |
void | Event when no longer spectating. | |
![]() |
void | ExecuteAsyncPhysicsCommand
(
const FAsyncPhysicsTimestamp& AsyncPhysicsTimestamp, |
Enqueues a command to run at the time specified by AsyncPhysicsTimestamp. |
![]() |
FClientFrameInfo
(
FClientFrameInfo&& |
||
![]() |
PRAGMA_ENABLE_DEPRECATION_WARNINGSPRAGMA_DISABLE_DEPRECATION_WARNINGS | ||
![]() |
FClientFrameInfo
(
const FClientFrameInfo& |
||
![]() |
PRAGMA_DISABLE_DEPRECATION_WARNINGS | ||
![]() |
FInputCmdBuffer
(
const FInputCmdBuffer& |
||
![]() |
FInputCmdBuffer
(
FInputCmdBuffer&& |
||
![]() ![]() |
void | Flushes the current key state. | |
![]() |
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 |
![]() ![]() ![]() ![]() |
void | FOV
(
float NewFOV |
Set the field of view to NewFOV |
![]() |
PRAGMA_ENABLE_DEPRECATION_WARNINGSPRAGMA_DISABLE_DEPRECATION_WARNINGS | ||
![]() |
FServerFrameInfo
(
const FServerFrameInfo& |
||
![]() |
FServerFrameInfo
(
FServerFrameInfo&& |
||
![]() |
void | GameplayMutePlayer
(
const FUniqueNetIdRepl& PlayerNetId |
Mutes a remote player on the server and then tells the client to mute |
![]() |
void | Unmutes all remote players muted due to gameplay rules on the server and then tells the client to unmute | |
![]() |
void | GameplayUnmutePlayer
(
const FUniqueNetIdRepl& PlayerNetId |
Unmutes a remote player on the server and then tells the client to unmute |
![]() |
FAsyncPhysicsTimestamp | GetAsyncPhysicsTimestamp
(
float DeltaSeconds |
Generates a timestamp for the upcoming physics step (plus any pending time). |
![]() ![]() ![]() |
bool | GetAudioListenerAttenuationOverridePosition
(
FVector& OutLocation |
Gets the attenuation position override. |
![]() ![]() ![]() |
void | GetAudioListenerPosition
(
FVector& OutLocation, |
Get audio listener position and orientation |
![]() ![]() ![]() |
ACameraActor * | ||
![]() |
PRAGMA_ENABLE_DEPRECATION_WARNINGSPRAGMA_DISABLE_DEPRECATION_WARNINGSFClientFrameInfo & | ||
![]() ![]() |
PRAGMA_DISABLE_DEPRECATION_WARNINGS const FClientFrameInfo & | ||
![]() ![]() |
const FString & | Keep track of the current input mode debug string here. | |
![]() ![]() ![]() ![]() |
float | A getter for the deprecated InputPitchScale property. | |
![]() ![]() ![]() ![]() |
float | A getter for the deprecated InputRollScale property. | |
![]() ![]() ![]() ![]() |
float | A getter for the deprecated InputYawScale property. | |
![]() ![]() ![]() ![]() ![]() |
FVector | Returns the location the PlayerController is focused on. | |
![]() ![]() |
bool | GetHitResultAtScreenPosition
(
const FVector2D ScreenPosition, |
|
![]() ![]() |
bool | GetHitResultAtScreenPosition
(
const FVector2D ScreenPosition, |
|
![]() ![]() |
bool | GetHitResultAtScreenPosition
(
const FVector2D ScreenPosition, |
|
![]() ![]() |
bool | GetHitResultAtScreenPosition
(
const FVector2D ScreenPosition, |
Returns hit results from doing a collision query at a certain location on the screen |
![]() ![]() ![]() ![]() |
bool | GetHitResultUnderCursor
(
ECollisionChannel TraceChannel, |
|
![]() ![]() ![]() ![]() |
bool | GetHitResultUnderCursorByChannel
(
ETraceTypeQuery TraceChannel, |
Performs a collision query under the mouse cursor, looking on a trace channel |
![]() ![]() ![]() ![]() |
bool | GetHitResultUnderCursorForObjects
(
const TArray< TEnumAsByte< EObjectTypeQuery > >& ObjectTypes, |
Performs a collision query under the mouse cursor, looking for object types |
![]() ![]() ![]() ![]() |
bool | GetHitResultUnderFinger
(
ETouchIndex::Type FingerIndex, |
|
![]() ![]() ![]() ![]() |
bool | GetHitResultUnderFingerByChannel
(
ETouchIndex::Type FingerIndex, |
Performs a collision query under the finger, looking on a trace channel |
![]() ![]() ![]() ![]() |
bool | GetHitResultUnderFingerForObjects
(
ETouchIndex::Type FingerIndex, |
Performs a collision query under the finger, looking for object types |
![]() ![]() |
T * | GetHUD () |
Templated version of GetHUD, will return nullptr if cast fails |
![]() ![]() ![]() ![]() |
AHUD * | GetHUD () |
Gets the HUD currently being used by this player controller |
![]() ![]() ![]() ![]() |
float | GetInputAnalogKeyState
(
FKey Key |
Returns the analog value for the given key/button. |
![]() ![]() ![]() ![]() |
void | GetInputAnalogStickState
(
EControllerAnalogStick::Type WhichStick, |
|
![]() ![]() ![]() ![]() |
void | GetInputAnalogStickState
(
EControllerAnalogStick::Type WhichStick, |
Retrieves the X and Y displacement of the given analog stick. |
![]() |
PRAGMA_DISABLE_DEPRECATION_WARNINGSFInputCmdBuffer & | ||
![]() ![]() ![]() |
int32 | ||
![]() ![]() ![]() ![]() |
float | GetInputKeyTimeDown
(
FKey Key |
Returns how long the given key/button has been down. |
![]() ![]() ![]() ![]() |
void | GetInputMotionState
(
FVector& Tilt, |
Retrieves the current motion state of the player's input device |
![]() ![]() ![]() ![]() |
void | GetInputMouseDelta
(
double& DeltaX, |
|
![]() ![]() ![]() ![]() |
void | GetInputMouseDelta
(
float& DeltaX, |
Retrieves how far the mouse moved this frame. |
![]() ![]() ![]() ![]() |
void | GetInputTouchState
(
ETouchIndex::Type FingerIndex, |
Retrieves the X and Y screen coordinates of the specified touch key. |
![]() ![]() ![]() ![]() |
void | GetInputTouchState
(
ETouchIndex::Type FingerIndex, |
|
![]() ![]() ![]() ![]() |
FVector | GetInputVectorKeyState
(
FKey Key |
Returns the vector value for the given key/button. |
![]() ![]() |
int32 | ||
![]() ![]() |
ULocalPlayer * | Returns the ULocalPlayer for this controller if it exists, or null otherwise | |
![]() ![]() |
int32 | Returns the current estimated offset between the local async physics step and the server. | |
![]() ![]() |
float | Calculate minimal respawn delay | |
![]() ![]() ![]() |
EMouseCursor::Type | Returns the current mouse cursor, or None | |
![]() ![]() ![]() ![]() |
bool | GetMousePosition
(
double& LocationX, |
|
![]() ![]() ![]() ![]() |
bool | GetMousePosition
(
float& LocationX, |
Retrieves the X and Y screen coordinates of the mouse cursor. |
![]() ![]() |
const TArray< FName > & | Returns the list of netcondition groups we are part of. | |
![]() ![]() |
int32 | 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 | |
![]() ![]() |
bool | True if the NetworkPhysicsTickOffset is setup, before this is setup the GetNetworkPhysicsTickOffset() and GetPhysicsTimestamp() functions will not return valid results | |
![]() ![]() |
APlayerState * | GetNextViewablePlayer
(
int32 dir |
Get next active viewable player in PlayerArray. |
![]() ![]() ![]() ![]() |
TSubclassOf< UPlayerInput > | ||
![]() ![]() |
APawn * | Returns the first of GetPawn() or GetSpectatorPawn() that is not nullptr, or nullptr otherwise. | |
![]() |
FAsyncPhysicsTimestamp | GetPhysicsTimestamp
(
float DeltaSeconds |
Generates a timestamp for the upcoming physics step (plus any pending time). |
![]() ![]() ![]() ![]() |
FPlatformUserId | Returns the platform user that is assigned to this Player Controller's Local Player. | |
![]() ![]() |
APlayerController * | GetPlayerControllerForMuting
(
const FUniqueNetIdRepl& PlayerNetId |
Get a remote player controller on the server for muting |
![]() |
FString | Get the local players network address | |
![]() ![]() |
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) |
![]() |
PRAGMA_DISABLE_DEPRECATION_WARNINGSFServerFrameInfo & | ||
![]() |
FString | Get the server network address | |
![]() ![]() |
int32 | Returns the current estimated offset between the server async physics step and the local one. | |
![]() ![]() |
FVector | Get the location used when initially created, or when changing states when there is no pawn or spectator. | |
![]() ![]() ![]() ![]() |
ASpectatorPawn * | Get the Pawn used when spectating. nullptr when not spectating. | |
![]() ![]() |
APlayerState * | GetSplitscreenPlayerByIndex
(
int32 PlayerIndex |
Returns the PlayerState associated with the player at the specified index. |
![]() ![]() |
int32 | Returns the number of split-screen players playing on this player's machine. | |
![]() ![]() ![]() ![]() ![]() |
void | GetStreamingSourceLocationAndRotation
(
FVector& OutLocation, |
Gets the streaming source location and rotation. |
![]() ![]() ![]() ![]() ![]() |
EStreamingSourcePriority | Gets the streaming source priority. | |
![]() ![]() ![]() ![]() ![]() |
void | GetStreamingSourceShapes
(
TArray< FStreamingSourceShape >& OutShapes |
Gets the streaming source priority. |
![]() ![]() ![]() |
bool | GetStreamingSourcesInternal
(
TArray< FWorldPartitionStreamingSource >& OutStreamingSources |
|
![]() ![]() ![]() ![]() |
void | GetViewportSize
(
int32& SizeX, |
Helper to get the size of the HUD canvas for this player controller. Returns 0 if there is no HUD |
![]() |
bool | Returns whether the client has completely loaded the server's current world (valid on server only) | |
![]() |
void |
IncludeInNetConditionGroup
(
FName NetGroup |
Make this player a member of a netcondition group. |
![]() ![]() |
void | Spawn the appropriate class of PlayerInput. | |
![]() ![]() |
bool | Handles a controller axis input | |
![]() ![]() |
bool | InputEnabled () |
|
![]() ![]() |
bool | InputKey
(
const FInputKeyParams& Params |
Handles a key press |
![]() ![]() |
bool | InputKey
(
FKey Key, |
Handles a key press |
![]() ![]() |
bool | InputMotion
(
const FVector& Tilt, |
Handles motion control |
![]() ![]() |
bool | InputTouch
(
uint32 Handle, |
Handles a touch screen action |
![]() ![]() |
bool | IsFrozen () |
Returns true if input should be frozen (whether UnFreeze timer is active) |
![]() ![]() ![]() |
bool | IsInputComponentInStack
(
const UInputComponent* Input |
Returns true if the given input component is in this PlayerController's CurrentInputStack |
![]() ![]() ![]() ![]() |
bool | IsInputKeyDown
(
FKey Key |
Returns true if the given key/button is pressed on the input of the controller (if present) |
![]() ![]() ![]() |
bool | IsInViewportClient
(
UGameViewportClient* ViewportClient |
|
![]() ![]() |
bool | IsMemberOfNetConditionGroup
(
FName NetGroup |
Returns true if the player controller is a member of the netcondition group |
![]() ![]() |
bool | IsPaused () |
Returns true if game is currently paused. |
![]() ![]() |
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 |
![]() ![]() |
bool | Wrapper for determining whether this player is the first player on their console. | |
![]() ![]() |
bool | IsSplitscreenPlayer
(
int32* OutSplitscreenPlayerIndex |
Determines whether this player is playing split-screen. |
![]() ![]() ![]() ![]() ![]() |
bool | Whether the PlayerController should be used as a World Partiton streaming source. | |
![]() ![]() ![]() |
void | K2_ClientPlayForceFeedback
(
UForceFeedbackEffect* ForceFeedbackEffect, |
Play a force feedback pattern on the player's controller |
![]() |
void | LevelStreamingStatusChanged
(
ULevelStreaming* LevelObject, |
Notify player of change to level |
![]() |
void | LevelStreamingStatusChanged
(
ULevelStreaming* LevelObject, |
|
![]() ![]() ![]() ![]() |
void | LocalTravel
(
const FString& URL |
Causes the client to travel to the given URL |
![]() |
FName | NetworkRemapPath
(
FName InPackageName, |
Handles remapping a package name for networking, call on both the client and server when sending package names manually for RPCs |
![]() ![]() |
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 |
![]() ![]() |
void | NotifyLoadedWorld
(
FName WorldPackageName, |
Called to notify the server when the client has loaded a new world via seamless traveling |
![]() ![]() |
bool | NotifyServerReceivedClientData
(
APawn* InPawn, |
Notify the server that client data was received on the Pawn. |
![]() |
void | Called when player controller gets added to its owning world player controller list. | |
![]() |
void | Called when player controller gets removed from its owning world player controller list. | |
![]() ![]() ![]() |
void | OnServerStartedVisualLogger
(
bool bIsLogging |
Notify from server that Visual Logger is recording, to show that information on client about possible performance issues |
![]() ![]() ![]() ![]() |
void | Pause () |
Command to try to pause the game. |
![]() ![]() |
void | Clean up when a Pawn's player is leaving a game. Base implementation destroys the pawn. | |
![]() |
FDynamicForceFeedbackHandle | PlayDynamicForceFeedback
(
float Intensity, |
Allows playing of a dynamic force feedback event from native code Begins playing when Start is called. |
![]() ![]() ![]() |
void | PlayDynamicForceFeedback
(
float Intensity, |
Latent action that controls the playing of force feedback Begins playing when Start is called. |
![]() ![]() |
void | PlayerTick
(
float DeltaTime |
Processes player input (immediately after PlayerInput gets ticked) and calls UpdateRotation(). |
![]() ![]() ![]() |
void | PlayHapticEffect
(
UHapticFeedbackEffect_Base* HapticEffect, |
Play a haptic feedback curve on the player's controller |
![]() ![]() |
bool | PopInputComponent
(
UInputComponent* Input |
Removes given inputcomponent from the input stack (regardless of if it's the top, actually). |
![]() ![]() |
void | PostProcessInput
(
const float DeltaTime, |
Method called after processing input |
![]() ![]() ![]() |
bool | PostProcessWorldToScreen
(
FVector WorldLocation, |
After successful world to screen projection, allows custom post-processing of the resulting ScreenLocation. |
![]() ![]() |
void | 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 | |
![]() ![]() |
void | PreClientTravel
(
const FString& PendingURL, |
Called when the local player is about to travel to a new map or IP address. |
![]() ![]() |
void | PreProcessInput
(
const float DeltaTime, |
Method called prior to processing input |
![]() |
void | ProcessForceFeedbackAndHaptics
(
const float DeltaTime, |
|
![]() ![]() |
void | ProcessPlayerInput
(
const float DeltaTime, |
|
![]() ![]() ![]() ![]() |
bool | ProjectWorldLocationToScreen
(
FVector WorldLocation, |
Convert a World Space 3D position into a 2D Screen Space position. |
![]() ![]() |
bool | ProjectWorldLocationToScreenWithDistance
(
FVector WorldLocation, |
Convert a World Space 3D position into a 3D Screen Space position. |
![]() |
void | PushClientInput
(
int32 ClientInputFrame, |
Client pushes input data locally. RPC is sent here but also includes redundant data |
![]() ![]() |
void | PushInputComponent
(
UInputComponent* Input |
Adds an inputcomponent to the top of the input stack. |
![]() ![]() |
void | ReceivedGameModeClass
(
TSubclassOf< class AGameModeBase > GameModeClass |
This function will be called to notify the player controller that the world has received its game class. |
![]() ![]() |
void | Called after this PlayerController's viewport/net connection is associated with this player controller. | |
![]() ![]() |
void | ReceivedSpectatorClass
(
TSubclassOf< ASpectatorPawn > SpectatorClass |
Called to notify the controller that the spectator class has been received. |
![]() |
void | RemoveFromNetConditionGroup
(
FName NetGroup |
Remove this player from a netcondition group. |
![]() ![]() |
void | Reset Camera Mode to default. | |
![]() ![]() ![]() |
void | Resets the player's controller deadzones to default | |
![]() ![]() ![]() |
void | Resets the light color of the player's controller to default | |
![]() ![]() ![]() ![]() |
void | RestartLevel () |
Restarts the current level |
![]() ![]() |
void | Call ClientRetryClientRestart, but only if the current pawn is not the currently acknowledged pawn (and throttled to avoid saturating the network). | |
![]() ![]() |
void | Call ServerCheckClientPossession on the server, but only if the current pawn is not the acknowledged pawn (and throttled to avoid saturating the network). | |
![]() |
void | Calls ServerSetSpectatorLocation but throttles it to reduce bandwidth and only calls it when necessary. | |
![]() ![]() |
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) |
![]() ![]() |
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) |
![]() ![]() |
void | Called on server at end of tick, to let client Pawns handle updates from the server. | |
![]() ![]() ![]() ![]() |
void | SendToConsole
(
const FString& Command |
Sends a command to the console to execute if not shipping version |
![]() ![]() ![]() ![]() |
void | ServerAcknowledgePossession
(
APawn* P |
Acknowledge possession of pawn |
![]() ![]() ![]() ![]() ![]() |
void | ServerBlockPlayer
(
FUniqueNetIdRepl PlayerId |
Tell the client to block a player for this controller |
![]() ![]() ![]() ![]() |
void | ServerCamera
(
FName NewMode |
Change mode of camera |
![]() ![]() ![]() ![]() |
void | ServerChangeName
(
const FString& S |
Change name of server |
![]() ![]() ![]() ![]() |
void | Tells the server to make sure the possessed pawn is in sync with the client. | |
![]() ![]() ![]() ![]() |
void | Reliable version of ServerCheckClientPossession to be used when there is no likely danger of spamming the network. | |
![]() ![]() ![]() |
void | ServerExec
(
const FString& Msg |
Executes command on server (non shipping builds only) |
![]() ![]() ![]() ![]() |
void | ServerExecRPC
(
const FString& Msg |
RPC used by ServerExec. Not intended to be called directly |
![]() ![]() ![]() ![]() ![]() |
void | ServerMutePlayer
(
FUniqueNetIdRepl PlayerId |
Tell the server to mute a player for this controller |
![]() ![]() ![]() ![]() |
void | ServerNotifyLoadedWorld
(
FName WorldPackageName |
Called to notify the server when the client has loaded a new world via seamless traveling |
![]() ![]() ![]() ![]() |
void | ServerPause () |
Replicate pause request to the server |
![]() ![]() ![]() |
void | ServerRecvClientInputFrame
(
int32 RecvClientInputFrame, |
Client says "Here is input frame number X" (and then calls other RPCs to deliver InputCmd payload) |
![]() ![]() ![]() ![]() |
void | Attempts to restart this player, generally called from the client upon respawn request. | |
![]() ![]() ![]() |
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 |
![]() ![]() ![]() ![]() |
void | ServerSetSpectatorLocation
(
FVector NewLoc, |
When spectating, updates spectator location/rotation and pings the server to make sure spectating should continue. |
![]() ![]() ![]() ![]() ![]() |
void | ServerSetSpectatorWaiting
(
bool bWaiting |
Indicate that the Spectator is waiting to join/respawn. |
![]() ![]() ![]() ![]() |
void | Notifies the server that the client has ticked gameplay code, and should no longer get the extended "still loading" timeout grace period | |
![]() ![]() ![]() ![]() |
void | Used by UGameplayDebuggingControllerComponent to replicate messages for AI debugging in network games. | |
![]() ![]() ![]() ![]() ![]() |
void | ServerUnblockPlayer
(
FUniqueNetIdRepl PlayerId |
Tell the client to unblock a player for this controller |
![]() ![]() ![]() ![]() ![]() |
void | ServerUnmutePlayer
(
FUniqueNetIdRepl PlayerId |
Tell the server to unmute a player for this controller |
![]() ![]() ![]() ![]() |
void | ServerUpdateCamera
(
FVector_NetQuantize CamLoc, |
@TODO - combine pitch/yaw into one int, maybe also send location compressed |
![]() ![]() ![]() ![]() |
void | ServerUpdateLevelVisibility
(
const FUpdateLevelVisibilityLevelInfo& LevelVisibility |
Called when the client adds/removes a streamed level. |
![]() ![]() ![]() ![]() |
void | ServerUpdateMultipleLevelsVisibility
(
const TArray< FUpdateLevelVisibilityLevelInfo >& LevelVisibilities |
Called when the client adds/removes a streamed level. |
![]() ![]() ![]() ![]() |
void | Used by client to request server to confirm current viewtarget (server will respond with ClientSetViewTarget() ). | |
![]() ![]() ![]() ![]() |
void | Move camera to next player on round ended or spectating | |
![]() ![]() ![]() ![]() |
void | Move camera to previous player on round ended or spectating | |
![]() ![]() ![]() ![]() |
void | ServerViewSelf
(
FViewTargetTransitionParams TransitionParams |
Move camera to current user |
![]() |
void | Designate this player controller as local (public for GameModeBase to use, not expected to be called anywhere else) | |
![]() ![]() ![]() |
void | SetAudioListenerAttenuationOverride
(
USceneComponent* AttachToComponent, |
|
![]() ![]() ![]() |
void | SetAudioListenerOverride
(
USceneComponent* AttachToComponent, |
Used to override the default positioning of the audio listener |
![]() ![]() |
void | SetCameraMode
(
FName NewCamMode |
Set new camera mode |
![]() ![]() |
void | SetCinematicMode
(
bool bInCinematicMode, |
Adjust input based on cinematic mode |
![]() ![]() ![]() ![]() |
void | SetCinematicMode
(
bool bInCinematicMode, |
Server/SP only function for changing whether the player is in cinematic mode. |
![]() ![]() ![]() |
void | SetControllerDeadZones
(
const float LeftDeadZone, |
Sets the deadzones of the player's controller |
![]() ![]() ![]() |
void | SetControllerLightColor
(
FColor Color |
Sets the light color of the player's controller |
![]() ![]() ![]() |
void | SetDeprecatedInputPitchScale
(
float NewValue |
A getter for the deprecated InputPitchScale property. |
![]() ![]() ![]() |
void | SetDeprecatedInputRollScale
(
float NewValue |
A getter for the deprecated InputRollScale property. |
![]() ![]() ![]() |
void | SetDeprecatedInputYawScale
(
float NewValue |
A getter for the deprecated InputYawScale property. |
![]() ![]() ![]() ![]() |
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 |
![]() ![]() ![]() |
void | SetHapticsByValue
(
const float Frequency, |
Sets the value of the haptics for the specified hand directly, using frequency and amplitude. |
![]() ![]() |
void | SetInputMode
(
const FInputModeDataBase& InData |
Setup an input mode. |
![]() ![]() ![]() |
void | SetMotionControlsEnabled
(
bool bEnabled |
|
![]() ![]() ![]() |
void | SetMouseCursorWidget
(
EMouseCursor::Type Cursor, |
Sets the Widget for the Mouse Cursor to display |
![]() ![]() ![]() |
void | SetMouseLocation
(
const int X, |
Positions the mouse cursor in screen space, in pixels. |
![]() ![]() ![]() ![]() |
void | Tries to set the player's name to the given name. | |
![]() |
void | SetNetSpeed
(
int32 NewSpeed |
Store the net speed |
![]() ![]() |
bool | SetPause
(
bool bPause, |
Locally try to pause game (call serverpause to pause network game); returns success indicator. |
![]() ![]() |
void | Associate a new UPlayer with this PlayerController. | |
![]() |
void | SetServerToLocalAsyncPhysicsTickOffset
(
const int32 AsyncPhysicsTickOffset |
Set the offset between the server async physics step and the local one. |
![]() |
void | SetShowMouseCursor
(
bool bShow |
|
![]() ![]() |
void | SetSpawnLocation
(
const FVector& NewLocation |
Set the SpawnLocation for use when changing states or when there is no pawn or spectator. |
![]() ![]() |
void | SetSpectatorPawn
(
ASpectatorPawn* NewSpectatorPawn |
Set the spectator pawn. |
![]() |
void | SetTargetViewRotation
(
const FRotator& InRotation |
Setter for TargetViewRotation. |
![]() ![]() |
void | SetupInactiveStateInputComponent
(
UInputComponent* InComponent |
Sets up input bindings for the input component pushed on the stack in the inactive state. |
![]() ![]() |
void | Allows the PlayerController to set up custom input bindings. | |
![]() ![]() |
void | SetViewTarget
(
AActor* NewViewTarget, |
Set the view target |
![]() ![]() ![]() ![]() |
void | SetViewTargetWithBlend
(
AActor* NewViewTarget, |
Set the view target blending with variable control |
![]() ![]() ![]() ![]() |
void | SetVirtualJoystickVisibility
(
bool bVisible |
Set the virtual joystick visibility. |
![]() ![]() ![]() |
bool | If true, then the GameViewportClient should call FlushPressedKeys on this controller when it loses focus. | |
![]() ![]() ![]() |
bool | Useful to spectate other pawn without un-possessing the current pawn | |
![]() ![]() |
bool | Returns true if we fully tick when paused (and if our tick function is enabled when paused). | |
![]() ![]() ![]() |
bool | Returns true if the mouse cursor should be shown | |
![]() ![]() |
void | SmoothTargetViewRotation
(
APawn* TargetPawn, |
Called client-side to smoothly interpolate received TargetViewRotation (result is in BlendedTargetViewRotation) |
![]() ![]() |
void | Spawn a HUD (make sure that PlayerController always has valid HUD, even if ClientSetHUD() hasn't been called | |
![]() ![]() |
void | Spawn cameras for servers and owning players | |
![]() ![]() |
ASpectatorPawn * | Spawn a SpectatorPawn to use as a spectator and initialize it. | |
![]() ![]() ![]() ![]() |
void | Fire the player's currently selected weapon with the optional firemode. | |
![]() ![]() |
void | Start spectating mode, as the only mode allowed. | |
![]() |
void | StartTalking () |
Enable voice chat transmission |
![]() ![]() ![]() |
void | StopHapticEffect
(
EControllerHand Hand |
Stops a playing haptic feedback curve |
![]() |
void | StopTalking () |
Disable voice chat transmission |
![]() ![]() ![]() ![]() ![]() |
bool | Whether the PlayerController streaming source should activate cells after loading. | |
![]() ![]() ![]() ![]() ![]() |
bool | Whether the PlayerController streaming source should block on slow streaming. | |
![]() ![]() ![]() ![]() |
void | SwitchLevel
(
const FString& URL |
SwitchLevel to the given MapURL. |
![]() |
void | TickPlayerInput
(
const float DeltaSeconds, |
Internal. |
![]() ![]() ![]() ![]() |
void | ToggleSpeaking
(
bool bInSpeaking |
Toggle voice chat on and off |
![]() ![]() |
void | UnFreeze () |
Timer used by RoundEnded and Inactive states to accept player input again |
![]() ![]() |
void | UpdateCameraManager
(
float DeltaSeconds |
Update the camera manager; this is called after all actors have been ticked. |
![]() ![]() |
void | UpdateForceFeedback
(
IInputInterface* InputInterface, |
|
![]() ![]() |
void | UpdateHiddenActors
(
const FVector& ViewLocation |
Builds a list of actors that are hidden based upon gameplay |
![]() ![]() |
void | UpdateHiddenComponents
(
const FVector& ViewLocation, |
Builds a list of components that are hidden based upon gameplay |
![]() ![]() |
void | UpdatePing
(
float InPing |
Takes ping updates from the net driver (both clientside and serverside), and passes them on to PlayerState::UpdatePing |
![]() ![]() |
void | UpdateRotation
(
float DeltaTime |
Updates the rotation of player, based on ControlRotation after RotationInput has been applied. |
![]() |
void | Update the tick offset in between the local client and the server | |
![]() |
void | ||
![]() ![]() |
void | Refresh state specific input components | |
![]() ![]() |
void | ViewAPlayer
(
int32 dir |
View next active player in PlayerArray. |
![]() ![]() ![]() ![]() |
bool | WasInputKeyJustPressed
(
FKey Key |
Returns true if the given key/button was up last frame and down this frame. |
![]() ![]() ![]() ![]() |
bool | WasInputKeyJustReleased
(
FKey Key |
Returns true if the given key/button was down last frame and up this frame. |
Overridden from AController
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | State entered when inactive (no possessed pawn, not spectating, etc). | |
![]() ![]() |
void | ChangeState
(
FName NewState |
Change the current state to named state |
![]() ![]() |
void | Called from Destroyed(). | |
![]() ![]() |
void | DisplayDebug
(
UCanvas* Canvas, |
|
![]() ![]() |
void | Called when leaving the inactive state | |
![]() ![]() |
void | GameMode failed to spawn pawn for me. | |
![]() ![]() |
void | GameHasEnded
(
AActor* EndGameFocus, |
Called from game mode upon end of the game, used to transition to proper state. |
![]() ![]() ![]() |
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 |
![]() ![]() ![]() |
AActor * | Get the actor the controller is looking at | |
![]() ![]() ![]() |
bool | Returns whether this Controller is a local controller. | |
![]() ![]() |
void | Overridable native function for when this controller is asked to possess a pawn. | |
![]() ![]() |
void | OnUnPossess () |
Overridable native function for when this controller unpossesses its pawn. |
![]() ![]() |
void | Reset move and look input ignore flags to defaults | |
![]() ![]() |
void | SetInitialLocationAndRotation
(
const FVector& NewLocation, |
Set the initial location and rotation of the controller, as well as the control rotation. |
![]() ![]() |
void | Setter for Pawn. Normally should only be used internally when possessing/unpossessing a Pawn. | |
![]() ![]() ![]() |
bool | Whether this controller should persist through seamless travel Player controllers should always be included in seamless travel |
Overridden from AActor
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | BeginPlay () |
Overridable native event for when play begins for this actor. |
![]() ![]() |
void | CalcCamera
(
float DeltaTime, |
Calculate camera view point, when viewing this actor. |
![]() ![]() |
void | Destroyed () |
Called when this actor is explicitly being destroyed during gameplay or in the editor, not called during level streaming or gameplay ending |
![]() ![]() |
bool | 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 | |
![]() ![]() |
void | DisableInput
(
APlayerController* PlayerController |
Removes this actor from the stack of input being handled by a PlayerController. |
![]() ![]() |
void | EnableInput
(
APlayerController* PlayerController |
Pushes this actor on to the stack of input being handled by a PlayerController. |
![]() ![]() |
void | EndPlay
(
const EEndPlayReason::Type EndPlayReason |
Overridable function called whenever this actor is being removed from a level |
![]() ![]() |
void | FellOutOfWorld
(
const UDamageType& dmgType |
Called when the actor falls out of the world 'safely' (below KillZ and such) |
![]() ![]() ![]() |
void | GetActorEyesViewPoint
(
FVector& OutLocation, |
Returns the point of view of the actor. |
![]() ![]() ![]() |
UNetConnection * | Get the owning connection used for communicating between client/server | |
![]() ![]() ![]() |
const AActor * | GetNetOwner () |
Return the actor responsible for replication, if any. Typically the player controller |
![]() ![]() |
UPlayer * | Return the owning UPlayer (if any) of this actor. | |
![]() ![]() |
float | GetNetPriority
(
const FVector& ViewPos, |
Function used to prioritize actors when deciding which to replicate |
![]() ![]() ![]() |
bool | HasNetOwner () |
Overridden to return that player controllers are capable of RPCs |
![]() ![]() ![]() |
bool | IsNetRelevantFor
(
const AActor* RealViewer, |
Checks to see if this actor is relevant for a specific network connection |
![]() ![]() |
void | OnActorChannelOpen
(
FInBunch& InBunch, |
Allows for a specific response from the actor when the actor channel is opened (client side) |
![]() ![]() |
void | OnNetCleanup
(
UNetConnection* Connection |
Handles cleaning up the associated Actor when killing the connection |
![]() ![]() |
void | OnSerializeNewActor
(
FOutBunch& OutBunch |
SerializeNewActor has just been called on the actor before network replication (server side) |
![]() ![]() |
void | Overridden to create the player replication info and perform other mundane initialization tasks. | |
![]() ![]() |
void | Reset () |
Reset actor to initial state - used when restarting level without reloading. |
![]() ![]() |
void | TickActor
(
float DeltaTime, |
Dispatches the once-per frame Tick() function for this actor |
![]() ![]() ![]() |
bool | Used by the net connection to determine if a net owning actor should switch to using the shortened timeout value |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
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 |
![]() ![]() |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
Overridden from IWorldPartitionStreamingSourceProvider
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
bool | GetStreamingSource
(
FWorldPartitionStreamingSource& OutStreamingSource |
|
![]() ![]() ![]() |
const UObject * | ||
![]() ![]() ![]() |
bool | GetStreamingSources
(
TArray< FWorldPartitionStreamingSource >& OutStreamingSources |
Gets the PlayerController's streaming sources |
Operators
Type | Name | Description | |
---|---|---|---|
![]() |
FInputCmdBuffer & | operator=
(
const FInputCmdBuffer& |
|
![]() |
FInputCmdBuffer & | operator=
(
FInputCmdBuffer&& |
|
![]() |
FClientFrameInfo & | operator=
(
const FClientFrameInfo& |
|
![]() |
FClientFrameInfo & | operator=
(
FClientFrameInfo&& |
|
![]() |
FServerFrameInfo & | operator=
(
FServerFrameInfo&& |
|
![]() |
FServerFrameInfo & | operator=
(
const FServerFrameInfo& |
Deprecated Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() ![]() |
float | InputPitchScale_DEPRECATED | Pitch input speed scaling |
![]() ![]() ![]() ![]() |
float | InputRollScale_DEPRECATED | Roll input speed scaling |
![]() ![]() ![]() ![]() |
float | InputYawScale_DEPRECATED | Yaw input speed scaling |
See Also
https://docs.unrealengine.com/latest/INT/Gameplay/Framework/Controller/PlayerController/