Show / Hide Table of Contents

Class PlayerController

PlayerControllers are used by human players to control Pawns.

Inheritance
System.Object
UObject
Actor
Controller
PlayerController
DebugCameraController
Inherited Members
Controller.ReceiveInstigatedAnyDamage
Controller.CastToPlayerController()
Controller.GetControlRotation()
Controller.GetDesiredRotation()
Controller.GetViewTarget()
Controller.IsLocalController()
Controller.IsLocalPlayerController()
Controller.IsLookInputIgnored()
Controller.IsMoveInputIgnored()
Controller.IsPlayerController()
Controller.K2_GetPawn()
Controller.LineOfSightTo(Actor, Vector, Boolean)
Controller.Possess(Pawn)
Controller.ResetIgnoreInputFlags()
Controller.ResetIgnoreLookInput()
Controller.ResetIgnoreMoveInput()
Controller.SetControlRotation(Rotator)
Controller.SetIgnoreLookInput(Boolean)
Controller.SetIgnoreMoveInput(Boolean)
Controller.SetInitialLocationAndRotation(Vector, Rotator)
Controller.StopMovement()
Controller.UnPossess()
Controller.PlayerState
Controller.StateName
Controller.Pawn
Controller.Character
Controller.TransformComponent
Controller.ControlRotation
Controller.bAttachToPawn
Controller.bIsPlayerController
Actor.K2_OnBecomeViewTarget
Actor.K2_OnEndViewTarget
Actor.K2_OnReset
Actor.ReceiveActorBeginCursorOver
Actor.ReceiveActorBeginOverlap
Actor.ReceiveActorEndCursorOver
Actor.ReceiveActorEndOverlap
Actor.ReceiveActorOnClicked
Actor.ReceiveActorOnInputTouchBegin
Actor.ReceiveActorOnInputTouchEnd
Actor.ReceiveActorOnInputTouchEnter
Actor.ReceiveActorOnInputTouchLeave
Actor.ReceiveActorOnReleased
Actor.ReceiveAnyDamage
Actor.ReceiveBeginPlay
Actor.ReceiveDestroyed
Actor.ReceiveEndPlay
Actor.ReceiveHit
Actor.ReceivePointDamage
Actor.ReceiveRadialDamage
Actor.ReceiveTick
Actor.UserConstructionScript
Actor.ActorHasTag(Name)
Actor.AddComponent(Name, Boolean, Transform, UObject)
Actor.AddTickPrerequisiteActor(Actor)
Actor.AddTickPrerequisiteComponent(ActorComponent)
Actor.DetachRootComponentFromParent(Boolean)
Actor.DisableInput(PlayerController)
Actor.EnableInput(PlayerController)
Actor.FlushNetDormancy()
Actor.ForceNetUpdate()
Actor.GetActorBounds(Boolean)
Actor.GetActorEnableCollision()
Actor.GetActorEyesViewPoint()
Actor.GetActorForwardVector()
Actor.GetActorLabel()
Actor.GetActorRelativeScale3D()
Actor.GetActorRightVector()
Actor.GetActorScale3D()
Actor.GetActorTickInterval()
Actor.GetActorTimeDilation()
Actor.GetActorUpVector()
Actor.GetAllChildActors(Boolean)
Actor.GetAttachedActors()
Actor.GetAttachParentActor()
Actor.GetAttachParentSocketName()
Actor.GetComponentByClass(SubclassOf<ActorComponent>)
Actor.GetComponentsByClass(SubclassOf<ActorComponent>)
Actor.GetComponentsByTag(SubclassOf<ActorComponent>, Name)
Actor.GetDistanceTo(Actor)
Actor.GetDotProductTo(Actor)
Actor.GetFolderPath(Name)
Actor.GetGameTimeSinceCreation()
Actor.GetHorizontalDistanceTo(Actor)
Actor.GetHorizontalDotProductTo(Actor)
Actor.GetInputAxisKeyValue(Key)
Actor.GetInputAxisValue(Name)
Actor.GetInputVectorAxisValue(Key)
Actor.GetInstigator()
Actor.GetInstigatorController()
Actor.GetLifeSpan()
Actor.GetLocalRole()
Actor.GetOverlappingActors(SubclassOf<Actor>)
Actor.GetOverlappingComponents()
Actor.GetOwner()
Actor.GetParentActor()
Actor.GetParentComponent()
Actor.GetRemoteRole()
Actor.GetSquaredDistanceTo(Actor)
Actor.GetTickableWhenPaused()
Actor.GetTransform()
Actor.GetVelocity()
Actor.GetVerticalDistanceTo(Actor)
Actor.HasAuthority()
Actor.IsActorBeingDestroyed()
Actor.IsActorTickEnabled()
Actor.IsChildActor()
Actor.IsEditable()
Actor.IsHiddenEd()
Actor.IsHiddenEdAtStartup()
Actor.IsOverlappingActor(Actor)
Actor.IsSelectable()
Actor.IsTemporarilyHiddenInEditor(Boolean)
Actor.K2_AddActorLocalOffset(Vector, Boolean, Boolean)
Actor.K2_AddActorLocalRotation(Rotator, Boolean, Boolean)
Actor.K2_AddActorLocalTransform(Transform, Boolean, Boolean)
Actor.K2_AddActorWorldOffset(Vector, Boolean, Boolean)
Actor.K2_AddActorWorldRotation(Rotator, Boolean, Boolean)
Actor.K2_AddActorWorldTransform(Transform, Boolean, Boolean)
Actor.K2_AttachRootComponentTo(SceneComponent, Name, Byte, Boolean)
Actor.K2_AttachRootComponentToActor(Actor, Name, Byte, Boolean)
Actor.K2_AttachToActor(Actor, Name, EAttachmentRule, EAttachmentRule, EAttachmentRule, Boolean)
Actor.K2_AttachToComponent(SceneComponent, Name, EAttachmentRule, EAttachmentRule, EAttachmentRule, Boolean)
Actor.K2_DestroyActor()
Actor.K2_DestroyComponent(ActorComponent)
Actor.K2_DetachFromActor(EDetachmentRule, EDetachmentRule, EDetachmentRule)
Actor.K2_GetActorLocation()
Actor.K2_GetActorRotation()
Actor.K2_GetRootComponent()
Actor.K2_SetActorLocation(Vector, Boolean, Boolean)
Actor.K2_SetActorLocationAndRotation(Vector, Rotator, Boolean, Boolean)
Actor.K2_SetActorRelativeLocation(Vector, Boolean, Boolean)
Actor.K2_SetActorRelativeRotation(Rotator, Boolean, Boolean)
Actor.K2_SetActorRelativeTransform(Transform, Boolean, Boolean)
Actor.K2_SetActorRotation(Rotator, Boolean)
Actor.K2_SetActorTransform(Transform, Boolean, Boolean)
Actor.K2_TeleportTo(Vector, Rotator)
Actor.MakeMIDForMaterial(MaterialInterface)
Actor.MakeNoise(Single, Pawn, Vector, Single, Name)
Actor.PrestreamTextures(Single, Boolean, Int32)
Actor.RemoveTickPrerequisiteActor(Actor)
Actor.RemoveTickPrerequisiteComponent(ActorComponent)
Actor.SetActorEnableCollision(Boolean)
Actor.SetActorHiddenInGame(Boolean)
Actor.SetActorLabel(String, Boolean)
Actor.SetActorRelativeScale3D(Vector)
Actor.SetActorScale3D(Vector)
Actor.SetActorTickEnabled(Boolean)
Actor.SetActorTickInterval(Single)
Actor.SetFolderPath(Name)
Actor.SetIsTemporarilyHiddenInEditor(Boolean)
Actor.SetLifeSpan(Single)
Actor.SetNetDormancy(Byte)
Actor.SetOwner(Actor)
Actor.SetReplicateMovement(Boolean)
Actor.SetReplicates(Boolean)
Actor.SetTickableWhenPaused(Boolean)
Actor.SetTickGroup(Byte)
Actor.SnapRootComponentTo(Actor, Name)
Actor.TearOff()
Actor.WasRecentlyRendered(Single)
Actor.PrimaryActorTick
Actor.bHidden
Actor.bNetTemporary
Actor.bNetStartup
Actor.bOnlyRelevantToOwner
Actor.bAlwaysRelevant
Actor.bReplicateMovement
Actor.bTearOff
Actor.bExchangedRoles
Actor.bNetLoadOnClient
Actor.bNetUseOwnerRelevancy
Actor.bRelevantForNetworkReplays
Actor.bReplayRewindable
Actor.bAllowTickBeforeBeginPlay
Actor.bAutoDestroyWhenFinished
Actor.bBlockInput
Actor.bCanBeDamaged
Actor.bCollideWhenPlacing
Actor.bFindCameraComponentWhenViewTarget
Actor.bGenerateOverlapEventsDuringLevelStreaming
Actor.bIgnoresOriginShifting
Actor.bEnableAutoLODGeneration
Actor.bIsEditorOnlyActor
Actor.bActorSeamlessTraveled
Actor.bReplicates
Actor.bCanBeInCluster
Actor.bAllowReceiveTickEventOnDedicatedServer
Actor.bActorEnableCollision
Actor.bActorIsBeingDestroyed
Actor.RemoteRole
Actor.ReplicatedMovement
Actor.InitialLifeSpan
Actor.CustomTimeDilation
Actor.AttachmentReplication
Actor.Owner
Actor.NetDriverName
Actor.Role
Actor.NetDormancy
Actor.AutoReceiveInput
Actor.InputPriority
Actor.InputComponent
Actor.NetCullDistanceSquared
Actor.NetTag
Actor.NetUpdateFrequency
Actor.MinNetUpdateFrequency
Actor.NetPriority
Actor.Instigator
Actor.Children
Actor.RootComponent
Actor.PivotOffset
Actor.ControllingMatineeActors
Actor.GroupActor
Actor.SpriteScale
Actor.FolderPath
Actor.bHiddenEd
Actor.bIsEditorPreviewActor
Actor.bHiddenEdLayer
Actor.bHiddenEdLevel
Actor.bLockLocation
Actor.bActorLabelEditable
Actor.bEditable
Actor.bListedInSceneOutliner
Actor.bHiddenEdTemporary
Actor.InstanceComponents
Actor.BlueprintCreatedComponents
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class PlayerController : Controller
Remarks

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.

@see https://docs.unrealengine.com/latest/INT/Gameplay/Framework/Controller/PlayerController/

Properties

| Improve this Doc View Source

AcknowledgedPawn

Used in net games so client can acknowledge it possessed a specific pawn.

Declaration
public Pawn AcknowledgedPawn { get; set; }
Property Value
Type Description
Pawn
| Improve this Doc View Source

bAutoManageActiveCameraTarget

Declaration
public bool bAutoManageActiveCameraTarget { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bEnableClickEvents

Declaration
public bool bEnableClickEvents { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bEnableMouseOverEvents

Declaration
public bool bEnableMouseOverEvents { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bEnableTouchEvents

Declaration
public bool bEnableTouchEvents { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bEnableTouchOverEvents

Declaration
public bool bEnableTouchOverEvents { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bForceFeedbackEnabled

Declaration
public bool bForceFeedbackEnabled { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bIsLocalPlayerController

Declaration
public bool bIsLocalPlayerController { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bPlayerIsWaiting

Declaration
public bool bPlayerIsWaiting { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bShouldPerformFullTickWhenPaused

Declaration
public bool bShouldPerformFullTickWhenPaused { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bShowMouseCursor

Declaration
public bool bShowMouseCursor { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

CheatClass

Class of my CheatManager. The Cheat Manager is not created in shipping builds

Declaration
public SubclassOf<CheatManager> CheatClass { get; }
Property Value
Type Description
SubclassOf<CheatManager>
| Improve this Doc View Source

CheatManager

Object that manages "cheat" commands. Not instantiated in shipping builds.

Declaration
public CheatManager CheatManager { get; }
Property Value
Type Description
CheatManager
| Improve this Doc View Source

ClientCap

Cap set by server on bandwidth from client to server in bytes/sec (only has impact if >=2600)

Declaration
public int ClientCap { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

ControllingDirTrackInst

Director track that's currently possessing this player controller, or none if not possessed.

Declaration
public InterpTrackInstDirector ControllingDirTrackInst { get; set; }
Property Value
Type Description
InterpTrackInstDirector
| Improve this Doc View Source

CurrentClickTraceChannel

Trace channel currently being used for determining what world object was clicked on.

Declaration
public byte CurrentClickTraceChannel { get; set; }
Property Value
Type Description
System.Byte
| Improve this Doc View Source

CurrentMouseCursor

Currently visible mouse cursor

Declaration
public byte CurrentMouseCursor { get; set; }
Property Value
Type Description
System.Byte
| Improve this Doc View Source

CurrentTouchInterface

The currently set touch interface

Declaration
public TouchInterface CurrentTouchInterface { get; set; }
Property Value
Type Description
TouchInterface
| Improve this Doc View Source

DefaultClickTraceChannel

Default trace channel used for determining what world object was clicked on.

Declaration
public byte DefaultClickTraceChannel { get; }
Property Value
Type Description
System.Byte
| Improve this Doc View Source

DefaultMouseCursor

Type of mouse cursor to show by default

Declaration
public byte DefaultMouseCursor { get; }
Property Value
Type Description
System.Byte
| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static PlayerController DefaultObject { get; }
Property Value
Type Description
PlayerController
| Improve this Doc View Source

ForceFeedbackScale

Scale applied to force feedback values

Declaration
public float ForceFeedbackScale { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

HiddenActors

The actors which the camera shouldn't see - e.g. used to hide actors which the camera penetrates

Declaration
public ObjectArrayField<Actor> HiddenActors { get; }
Property Value
Type Description
ObjectArrayField<Actor>
| Improve this Doc View Source

HitResultTraceDistance

Distance to trace when computing click events

Declaration
public float HitResultTraceDistance { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

InactiveStateInputComponent

InputComponent we use when player is in Inactive state.

Declaration
public InputComponent InactiveStateInputComponent { get; set; }
Property Value
Type Description
InputComponent
| Improve this Doc View Source

InputPitchScale

Pitch input speed scaling

Declaration
public float InputPitchScale { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

InputRollScale

Roll input speed scaling

Declaration
public float InputRollScale { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

InputYawScale

Yaw input speed scaling

Declaration
public float InputYawScale { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

LastSpectatorStateSynchTime

Used to make sure the client is kept synchronized when in a spectator state

Declaration
public float LastSpectatorStateSynchTime { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

LastSpectatorSyncLocation

Last location synced on the server for a spectator.

Declaration
public Vector LastSpectatorSyncLocation { get; set; }
Property Value
Type Description
Vector
| Improve this Doc View Source

LastSpectatorSyncRotation

Last rotation synced on the server for a spectator.

Declaration
public Rotator LastSpectatorSyncRotation { get; set; }
Property Value
Type Description
Rotator
| Improve this Doc View Source

MyHUD

Heads up display associated with this PlayerController.

Declaration
public HUD MyHUD { get; set; }
Property Value
Type Description
HUD
| Improve this Doc View Source

NetConnection

The net connection this controller is communicating on, nullptr for local players on server

Declaration
public NetConnection NetConnection { get; set; }
Property Value
Type Description
NetConnection
| Improve this Doc View Source

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

Declaration
public byte NetPlayerIndex { get; set; }
Property Value
Type Description
System.Byte
Remarks

replicated via special internal code, not through normal variable replication

| Improve this Doc View Source

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) @

Declaration
public NetConnection PendingSwapConnection { get; set; }
Property Value
Type Description
NetConnection
Remarks

see GameModeBase::SwapPlayerControllers()

| Improve this Doc View Source

Player

UPlayer associated with this PlayerController. Could be a local player or a net connection.

Declaration
public Player Player { get; set; }
Property Value
Type Description
Player
| Improve this Doc View Source

PlayerCameraManager

Camera manager associated with this Player Controller.

Declaration
public PlayerCameraManager PlayerCameraManager { get; }
Property Value
Type Description
PlayerCameraManager
| Improve this Doc View Source

PlayerCameraManagerClass

PlayerCamera class should be set for each game, otherwise Engine.PlayerCameraManager is used

Declaration
public SubclassOf<PlayerCameraManager> PlayerCameraManagerClass { get; }
Property Value
Type Description
SubclassOf<PlayerCameraManager>
| Improve this Doc View Source

PlayerInput

Object that manages player input.

Declaration
public PlayerInput PlayerInput { get; set; }
Property Value
Type Description
PlayerInput
| Improve this Doc View Source

SmoothTargetViewRotationSpeed

Interp speed for blending remote view rotation for smoother client updates

Declaration
public float SmoothTargetViewRotationSpeed { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

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.

Declaration
public Vector SpawnLocation { get; set; }
Property Value
Type Description
Vector
| Improve this Doc View Source

SpectatorPawn

The pawn used when spectating (nullptr if not spectating).

Declaration
public SpectatorPawn SpectatorPawn { get; set; }
Property Value
Type Description
SpectatorPawn
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class
| Improve this Doc View Source

TargetViewRotation

Used to replicate the view rotation of targets not owned/possessed by this PlayerController.

Declaration
public Rotator TargetViewRotation { get; set; }
Property Value
Type Description
Rotator

Methods

| Improve this Doc View Source

ActivateTouchInterface(TouchInterface)

Activates a new touch interface for this player controller

Declaration
public void ActivateTouchInterface(TouchInterface NewTouchInterface)
Parameters
Type Name Description
TouchInterface NewTouchInterface
| Improve this Doc View Source

AddPitchInput(Single)

Add Pitch (look up) input.

Declaration
public void AddPitchInput(float Val)
Parameters
Type Name Description
System.Single Val
Remarks

This value is multiplied by InputPitchScale. @param Val Amount to add to Pitch. This value is multiplied by InputPitchScale.

| Improve this Doc View Source

AddRollInput(Single)

Add Roll input.

Declaration
public void AddRollInput(float Val)
Parameters
Type Name Description
System.Single Val
Remarks

This value is multiplied by InputRollScale. @param Val Amount to add to Roll. This value is multiplied by InputRollScale.

| Improve this Doc View Source

AddYawInput(Single)

Add Yaw (turn) input.

Declaration
public void AddYawInput(float Val)
Parameters
Type Name Description
System.Single Val
Remarks

This value is multiplied by InputYawScale. @param Val Amount to add to Yaw. This value is multiplied by InputYawScale.

| Improve this Doc View Source

CanRestartPlayer()

@return true if this controller thinks it's able to restart. Called from GameModeBase::PlayerCanRestart

Declaration
public bool CanRestartPlayer()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ClearAudioListenerAttenuationOverride()

Clear Audio Listener Attenuation Override

Declaration
public void ClearAudioListenerAttenuationOverride()
| Improve this Doc View Source

ClearAudioListenerOverride()

Clear any overrides that have been applied to audio listener

Declaration
public void ClearAudioListenerOverride()
| Improve this Doc View Source

ClientClearCameraLensEffects()

Removes all Camera Lens Effects.

Declaration
public void ClientClearCameraLensEffects()
| Improve this Doc View Source

ClientPlayCameraAnim(CameraAnim, Single, Single, Single, Single, Boolean, Boolean, Byte, Rotator)

Play the indicated CameraAnim on this camera.

Declaration
public void ClientPlayCameraAnim(CameraAnim AnimToPlay, float Scale, float Rate, float BlendInTime, float BlendOutTime, bool bLoop, bool bRandomStartTime, byte Space, Rotator CustomPlaySpace)
Parameters
Type Name Description
CameraAnim AnimToPlay
System.Single Scale
System.Single Rate
System.Single BlendInTime
System.Single BlendOutTime
System.Boolean bLoop
System.Boolean bRandomStartTime
System.Byte Space
Rotator CustomPlaySpace
Remarks

@param AnimToPlay - Camera animation to play @param Scale - "Intensity" scalar. This is the scale at which the anim was first played. @param Rate - Multiplier for playback rate. 1.0 = normal. @param BlendInTime - Time to interpolate in from zero, for smooth starts @param BlendOutTime - Time to interpolate out to zero, for smooth finishes @param bLoop - True if the animation should loop, false otherwise @param bRandomStartTime - Whether or not to choose a random time to start playing. Only really makes sense for bLoop = true @param Space - Animation play area @param CustomPlaySpace - Matrix used when Space = CAPS_UserDefined

| Improve this Doc View Source

ClientPlayCameraShake(SubclassOf<CameraShake>, Single, Byte, Rotator)

Play Camera Shake @

Declaration
public void ClientPlayCameraShake(SubclassOf<CameraShake> Shake, float Scale, byte PlaySpace, Rotator UserPlaySpaceRot)
Parameters
Type Name Description
SubclassOf<CameraShake> Shake
System.Single Scale
System.Byte PlaySpace
Rotator UserPlaySpaceRot
Remarks

param Shake - Camera shake animation to play @param Scale - Scalar defining how "intense" to play the anim @param PlaySpace - Which coordinate system to play the shake in (used for CameraAnims within the shake). @param UserPlaySpaceRot - Matrix used when PlaySpace = CAPS_UserDefined

| Improve this Doc View Source

ClientPlayForceFeedback(ForceFeedbackEffect, Boolean, Boolean, Name)

Play a force feedback pattern on the player's controller @

Declaration
public void ClientPlayForceFeedback(ForceFeedbackEffect ForceFeedbackEffect, bool bLooping, bool bIgnoreTimeDilation, Name Tag)
Parameters
Type Name Description
ForceFeedbackEffect ForceFeedbackEffect
System.Boolean bLooping
System.Boolean bIgnoreTimeDilation
Name Tag
Remarks

param ForceFeedbackEffect The force feedback pattern to play @param bLooping Whether the pattern should be played repeatedly or be a single one shot @param bIgnoreTimeDilation Whether the pattern should ignore time dilation @param Tag A tag that allows stopping of an effect. If another effect with this Tag is playing, it will be stopped and replaced

| Improve this Doc View Source

ClientSetHUD(SubclassOf<HUD>)

Set the client's class of HUD and spawns a new instance of it. If there was already a HUD active, it is destroyed.

Declaration
public void ClientSetHUD(SubclassOf<HUD> NewHUDClass)
Parameters
Type Name Description
SubclassOf<HUD> NewHUDClass
| Improve this Doc View Source

ClientSpawnCameraLensEffect(SubclassOf<EmitterCameraLensEffectBase>)

Spawn a camera lens effect (e.g. blood).

Declaration
public void ClientSpawnCameraLensEffect(SubclassOf<EmitterCameraLensEffectBase> LensEffectEmitterClass)
Parameters
Type Name Description
SubclassOf<EmitterCameraLensEffectBase> LensEffectEmitterClass
| Improve this Doc View Source

ClientStopCameraShake(SubclassOf<CameraShake>, Boolean)

Stop camera shake on client.

Declaration
public void ClientStopCameraShake(SubclassOf<CameraShake> Shake, bool bImmediately)
Parameters
Type Name Description
SubclassOf<CameraShake> Shake
System.Boolean bImmediately
| Improve this Doc View Source

ClientStopForceFeedback(ForceFeedbackEffect, Name)

Stops a playing force feedback pattern @

Declaration
public void ClientStopForceFeedback(ForceFeedbackEffect ForceFeedbackEffect, Name Tag)
Parameters
Type Name Description
ForceFeedbackEffect ForceFeedbackEffect
Name Tag
Remarks

param ForceFeedbackEffect If set only patterns from that effect will be stopped @param Tag If not none only the pattern with this tag will be stopped

| Improve this Doc View Source

DeprojectMousePositionToWorld()

Convert current mouse 2D position to World Space 3D position and direction. Returns false if unable to determine value. *

Declaration
public (Vector, Vector, bool) DeprojectMousePositionToWorld()
Returns
Type Description
System.ValueTuple<Vector, Vector, System.Boolean>
| Improve this Doc View Source

DeprojectScreenPositionToWorld(Single, Single)

Convert 2D screen position to World Space 3D position and direction. Returns false if unable to determine value. *

Declaration
public (Vector, Vector, bool) DeprojectScreenPositionToWorld(float ScreenX, float ScreenY)
Parameters
Type Name Description
System.Single ScreenX
System.Single ScreenY
Returns
Type Description
System.ValueTuple<Vector, Vector, System.Boolean>
| Improve this Doc View Source

GetFocalLocation()

Returns the location the PlayerController is focused on.

Declaration
public Vector GetFocalLocation()
Returns
Type Description
Vector
Remarks

If there is a possessed Pawn, returns the Pawn's location. If there is a spectator Pawn, returns that Pawn's location. Otherwise, returns the PlayerController's spawn location (usually the last known Pawn location after it has died).

| Improve this Doc View Source

GetHitResultUnderCursor(Byte, Boolean)

Get Hit Result Under Cursor

Declaration
public (HitResult, bool) GetHitResultUnderCursor(byte TraceChannel, bool bTraceComplex)
Parameters
Type Name Description
System.Byte TraceChannel
System.Boolean bTraceComplex
Returns
Type Description
System.ValueTuple<HitResult, System.Boolean>
| Improve this Doc View Source

GetHitResultUnderCursorByChannel(Byte, Boolean)

Performs a collision query under the mouse cursor, looking on a trace channel

Declaration
public (HitResult, bool) GetHitResultUnderCursorByChannel(byte TraceChannel, bool bTraceComplex)
Parameters
Type Name Description
System.Byte TraceChannel
System.Boolean bTraceComplex
Returns
Type Description
System.ValueTuple<HitResult, System.Boolean>
| Improve this Doc View Source

GetHitResultUnderCursorForObjects(Byte, Boolean)

Performs a collision query under the mouse cursor, looking for object types

Declaration
public (HitResult, bool) GetHitResultUnderCursorForObjects(byte ObjectTypes, bool bTraceComplex)
Parameters
Type Name Description
System.Byte ObjectTypes
System.Boolean bTraceComplex
Returns
Type Description
System.ValueTuple<HitResult, System.Boolean>
| Improve this Doc View Source

GetHitResultUnderFinger(Byte, Byte, Boolean)

Get Hit Result Under Finger

Declaration
public (HitResult, bool) GetHitResultUnderFinger(byte FingerIndex, byte TraceChannel, bool bTraceComplex)
Parameters
Type Name Description
System.Byte FingerIndex
System.Byte TraceChannel
System.Boolean bTraceComplex
Returns
Type Description
System.ValueTuple<HitResult, System.Boolean>
| Improve this Doc View Source

GetHitResultUnderFingerByChannel(Byte, Byte, Boolean)

Performs a collision query under the finger, looking on a trace channel

Declaration
public (HitResult, bool) GetHitResultUnderFingerByChannel(byte FingerIndex, byte TraceChannel, bool bTraceComplex)
Parameters
Type Name Description
System.Byte FingerIndex
System.Byte TraceChannel
System.Boolean bTraceComplex
Returns
Type Description
System.ValueTuple<HitResult, System.Boolean>
| Improve this Doc View Source

GetHitResultUnderFingerForObjects(Byte, Byte, Boolean)

Performs a collision query under the finger, looking for object types

Declaration
public (HitResult, bool) GetHitResultUnderFingerForObjects(byte FingerIndex, byte ObjectTypes, bool bTraceComplex)
Parameters
Type Name Description
System.Byte FingerIndex
System.Byte ObjectTypes
System.Boolean bTraceComplex
Returns
Type Description
System.ValueTuple<HitResult, System.Boolean>
| Improve this Doc View Source

GetHUD()

Gets the HUD currently being used by this player controller

Declaration
public HUD GetHUD()
Returns
Type Description
HUD
| Improve this Doc View Source

GetInputAnalogKeyState(Key)

Returns the analog value for the given key/button. If analog isn't supported, returns 1 for down and 0 for up.

Declaration
public float GetInputAnalogKeyState(Key Key)
Parameters
Type Name Description
Key Key
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInputAnalogStickState(Byte)

Retrieves the X and Y displacement of the given analog stick.

Declaration
public (float, float) GetInputAnalogStickState(byte WhichStick)
Parameters
Type Name Description
System.Byte WhichStick
Returns
Type Description
System.ValueTuple<System.Single, System.Single>
| Improve this Doc View Source

GetInputKeyTimeDown(Key)

Returns how long the given key/button has been down. Returns 0 if it's up or it just went down this frame.

Declaration
public float GetInputKeyTimeDown(Key Key)
Parameters
Type Name Description
Key Key
Returns
Type Description
System.Single
| Improve this Doc View Source

GetInputMotionState()

Retrieves the current motion state of the player's input device

Declaration
public (Vector, Vector, Vector, Vector) GetInputMotionState()
Returns
Type Description
System.ValueTuple<Vector, Vector, Vector, Vector>
| Improve this Doc View Source

GetInputMouseDelta()

Retrieves how far the mouse moved this frame.

Declaration
public (float, float) GetInputMouseDelta()
Returns
Type Description
System.ValueTuple<System.Single, System.Single>
| Improve this Doc View Source

GetInputTouchState(Byte)

Retrieves the X and Y screen coordinates of the specified touch key. Returns false if the touch index is not down

Declaration
public (float, float, bool) GetInputTouchState(byte FingerIndex)
Parameters
Type Name Description
System.Byte FingerIndex
Returns
Type Description
System.ValueTuple<System.Single, System.Single, System.Boolean>
| Improve this Doc View Source

GetInputVectorKeyState(Key)

Returns the vector value for the given key/button.

Declaration
public Vector GetInputVectorKeyState(Key Key)
Parameters
Type Name Description
Key Key
Returns
Type Description
Vector
| Improve this Doc View Source

GetMousePosition()

Retrieves the X and Y screen coordinates of the mouse cursor. Returns false if there is no associated mouse device

Declaration
public (float, float, bool) GetMousePosition()
Returns
Type Description
System.ValueTuple<System.Single, System.Single, System.Boolean>
| Improve this Doc View Source

GetSpectatorPawn()

Get the Pawn used when spectating. nullptr when not spectating.

Declaration
public SpectatorPawn GetSpectatorPawn()
Returns
Type Description
SpectatorPawn
| Improve this Doc View Source

GetViewportSize()

Helper to get the size of the HUD canvas for this player controller. Returns 0 if there is no HUD

Declaration
public (int, int) GetViewportSize()
Returns
Type Description
System.ValueTuple<System.Int32, System.Int32>
| Improve this Doc View Source

IsInputKeyDown(Key)

Returns true if the given key/button is pressed on the input of the controller (if present)

Declaration
public bool IsInputKeyDown(Key Key)
Parameters
Type Name Description
Key Key
Returns
Type Description
System.Boolean
| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

Declaration
public static PlayerController New(UObject obj = null, Name name = default(Name))
Parameters
Type Name Description
UObject obj
Name name
Returns
Type Description
PlayerController
| Improve this Doc View Source

PlayDynamicForceFeedback(Single, Single, Boolean, Boolean, Boolean, Boolean, Byte, LatentActionInfo)

Latent action that controls the playing of force feedback Begins playing when Start is called.

Declaration
public void PlayDynamicForceFeedback(float Intensity, float Duration, bool bAffectsLeftLarge, bool bAffectsLeftSmall, bool bAffectsRightLarge, bool bAffectsRightSmall, byte Action, LatentActionInfo LatentInfo)
Parameters
Type Name Description
System.Single Intensity
System.Single Duration
System.Boolean bAffectsLeftLarge
System.Boolean bAffectsLeftSmall
System.Boolean bAffectsRightLarge
System.Boolean bAffectsRightSmall
System.Byte Action
LatentActionInfo LatentInfo
Remarks

Calling Update or Stop if the feedback is not active will have no effect. Completed will execute when Stop is called or the duration ends. When Update is called the Intensity, Duration, and affect values will be updated with the current inputs @param Intensity How strong the feedback should be. Valid values are between 0.0 and 1.0 @param Duration How long the feedback should play for. If the value is negative it will play until stopped @param bAffectsLeftLarge Whether the intensity should be applied to the large left servo @param bAffectsLeftSmall Whether the intensity should be applied to the small left servo @param bAffectsRightLarge Whether the intensity should be applied to the large right servo @param bAffectsRightSmall Whether the intensity should be applied to the small right servo

| Improve this Doc View Source

PlayHapticEffect(HapticFeedbackEffect_Base, EControllerHand, Single, Boolean)

Play a haptic feedback curve on the player's controller @

Declaration
public void PlayHapticEffect(HapticFeedbackEffect_Base HapticEffect, EControllerHand Hand, float Scale, bool bLoop)
Parameters
Type Name Description
HapticFeedbackEffect_Base HapticEffect
EControllerHand Hand
System.Single Scale
System.Boolean bLoop
Remarks

param HapticEffect The haptic effect to play @param Hand Which hand to play the effect on @param Scale Scale between 0.0 and 1.0 on the intensity of playback

| Improve this Doc View Source

ProjectWorldLocationToScreen(Vector, Boolean)

Convert a World Space 3D position into a 2D Screen Space position.

Declaration
public (Vector2D, bool) ProjectWorldLocationToScreen(Vector WorldLocation, bool bPlayerViewportRelative)
Parameters
Type Name Description
Vector WorldLocation
System.Boolean bPlayerViewportRelative
Returns
Type Description
System.ValueTuple<Vector2D, System.Boolean>
Remarks

@return true if the world coordinate was successfully projected to the screen.

| Improve this Doc View Source

SetAudioListenerAttenuationOverride(SceneComponent, Vector)

Set Audio Listener Attenuation Override

Declaration
public void SetAudioListenerAttenuationOverride(SceneComponent AttachToComponent, Vector AttenuationLocationOVerride)
Parameters
Type Name Description
SceneComponent AttachToComponent
Vector AttenuationLocationOVerride
| Improve this Doc View Source

SetAudioListenerOverride(SceneComponent, Vector, Rotator)

Used to override the default positioning of the audio listener @

Declaration
public void SetAudioListenerOverride(SceneComponent AttachToComponent, Vector Location, Rotator Rotation)
Parameters
Type Name Description
SceneComponent AttachToComponent
Vector Location
Rotator Rotation
Remarks

param AttachToComponent Optional component to attach the audio listener to @param Location Depending on whether Component is attached this is either an offset from its location or an absolute position @param Rotation Depending on whether Component is attached this is either an offset from its rotation or an absolute rotation

| Improve this Doc View Source

SetCinematicMode(Boolean, Boolean, Boolean, Boolean, Boolean)

Server/SP only function for changing whether the player is in cinematic mode.

Declaration
public void SetCinematicMode(bool bInCinematicMode, bool bHidePlayer, bool bAffectsHUD, bool bAffectsMovement, bool bAffectsTurning)
Parameters
Type Name Description
System.Boolean bInCinematicMode
System.Boolean bHidePlayer
System.Boolean bAffectsHUD
System.Boolean bAffectsMovement
System.Boolean bAffectsTurning
Remarks

Updates values of various state variables, then replicates the call to the client to sync the current cinematic mode. @param bInCinematicMode specify true if the player is entering cinematic mode; false if the player is leaving cinematic mode. @param bHidePlayer specify true to hide the player's pawn (only relevant if bInCinematicMode is true) @param bAffectsHUD specify true if we should show/hide the HUD to match the value of bCinematicMode @param bAffectsMovement specify true to disable movement in cinematic mode, enable it when leaving @param bAffectsTurning specify true to disable turning in cinematic mode or enable it when leaving

| Improve this Doc View Source

SetControllerLightColor(Color)

Sets the light color of the player's controller @

Declaration
public void SetControllerLightColor(Color Color)
Parameters
Type Name Description
Color Color
Remarks

param Color The color for the light to be

| Improve this Doc View Source

SetDisableHaptics(Boolean)

Allows the player controller to disable all haptic requests from being fired, e.

Declaration
public void SetDisableHaptics(bool bNewDisabled)
Parameters
Type Name Description
System.Boolean bNewDisabled
Remarks

g. in the case of a level loading

@param bNewDisabled If TRUE, the haptics will stop and prevented from being enabled again until set to FALSE

| Improve this Doc View Source

SetHapticsByValue(Single, Single, EControllerHand)

Sets the value of the haptics for the specified hand directly, using frequency and amplitude.

Declaration
public void SetHapticsByValue(float Frequency, float Amplitude, EControllerHand Hand)
Parameters
Type Name Description
System.Single Frequency
System.Single Amplitude
EControllerHand Hand
Remarks

NOTE: If a curve is already playing for this hand, it will be cancelled in favour of the specified values.

@param Frequency The normalized frequency [0.0, 1.0] to play through the haptics system @param Amplitude The normalized amplitude [0.0, 1.0] to set the haptic feedback to @param Hand Which hand to play the effect on

| Improve this Doc View Source

SetMouseCursorWidget(Byte, UserWidget)

Sets the Widget for the Mouse Cursor to display @

Declaration
public void SetMouseCursorWidget(byte Cursor, UserWidget CursorWidget)
Parameters
Type Name Description
System.Byte Cursor
UserWidget CursorWidget
Remarks

param Cursor - the cursor to set the widget for @param CursorWidget - the widget to set the cursor to

| Improve this Doc View Source

SetMouseLocation(Int32, Int32)

Positions the mouse cursor in screen space, in pixels.

Declaration
public void SetMouseLocation(int X, int Y)
Parameters
Type Name Description
System.Int32 X
System.Int32 Y
| Improve this Doc View Source

SetViewTargetWithBlend(Actor, Single, Byte, Single, Boolean)

Set the view target blending with variable control @

Declaration
public void SetViewTargetWithBlend(Actor NewViewTarget, float BlendTime, byte BlendFunc, float BlendExp, bool bLockOutgoing)
Parameters
Type Name Description
Actor NewViewTarget
System.Single BlendTime
System.Byte BlendFunc
System.Single BlendExp
System.Boolean bLockOutgoing
Remarks

param NewViewTarget - new actor to set as view target @param BlendTime - time taken to blend @param BlendFunc - Cubic, Linear etc functions for blending @param BlendExp - Exponent, used by certain blend functions to control the shape of the curve. @param bLockOutgoing - If true, lock outgoing viewtarget to last frame's camera position for the remainder of the blend.

| Improve this Doc View Source

SetVirtualJoystickVisibility(Boolean)

Set the virtual joystick visibility.

Declaration
public void SetVirtualJoystickVisibility(bool bVisible)
Parameters
Type Name Description
System.Boolean bVisible
| Improve this Doc View Source

StopHapticEffect(EControllerHand)

Stops a playing haptic feedback curve @

Declaration
public void StopHapticEffect(EControllerHand Hand)
Parameters
Type Name Description
EControllerHand Hand
Remarks

param HapticEffect The haptic effect to stop @param Hand Which hand to stop the effect for

| Improve this Doc View Source

WasInputKeyJustPressed(Key)

Returns true if the given key/button was up last frame and down this frame.

Declaration
public bool WasInputKeyJustPressed(Key Key)
Parameters
Type Name Description
Key Key
Returns
Type Description
System.Boolean
| Improve this Doc View Source

WasInputKeyJustReleased(Key)

Returns true if the given key/button was down last frame and up this frame.

Declaration
public bool WasInputKeyJustReleased(Key Key)
Parameters
Type Name Description
Key Key
Returns
Type Description
System.Boolean

Operators

| Improve this Doc View Source

Implicit(IntPtr to PlayerController)

Convert from IntPtr to UObject

Declaration
public static implicit operator PlayerController(IntPtr p)
Parameters
Type Name Description
System.IntPtr p
Returns
Type Description
PlayerController
  • Improve this Doc
  • View Source
Back to top Generated by DocFX