Class PlayerController
PlayerControllers are used by human players to control Pawns.
Inherited Members
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 SourceAcknowledgedPawn
Used in net games so client can acknowledge it possessed a specific pawn.
Declaration
public Pawn AcknowledgedPawn { get; set; }
Property Value
Type | Description |
---|---|
Pawn |
bAutoManageActiveCameraTarget
Declaration
public bool bAutoManageActiveCameraTarget { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bEnableClickEvents
Declaration
public bool bEnableClickEvents { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bEnableMouseOverEvents
Declaration
public bool bEnableMouseOverEvents { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bEnableTouchEvents
Declaration
public bool bEnableTouchEvents { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bEnableTouchOverEvents
Declaration
public bool bEnableTouchOverEvents { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bForceFeedbackEnabled
Declaration
public bool bForceFeedbackEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bIsLocalPlayerController
Declaration
public bool bIsLocalPlayerController { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bPlayerIsWaiting
Declaration
public bool bPlayerIsWaiting { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
bShouldPerformFullTickWhenPaused
Declaration
public bool bShouldPerformFullTickWhenPaused { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
bShowMouseCursor
Declaration
public bool bShowMouseCursor { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
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> |
CheatManager
Object that manages "cheat" commands. Not instantiated in shipping builds.
Declaration
public CheatManager CheatManager { get; }
Property Value
Type | Description |
---|---|
CheatManager |
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 |
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 |
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 |
CurrentMouseCursor
Currently visible mouse cursor
Declaration
public byte CurrentMouseCursor { get; set; }
Property Value
Type | Description |
---|---|
System.Byte |
CurrentTouchInterface
The currently set touch interface
Declaration
public TouchInterface CurrentTouchInterface { get; set; }
Property Value
Type | Description |
---|---|
TouchInterface |
DefaultClickTraceChannel
Default trace channel used for determining what world object was clicked on.
Declaration
public byte DefaultClickTraceChannel { get; }
Property Value
Type | Description |
---|---|
System.Byte |
DefaultMouseCursor
Type of mouse cursor to show by default
Declaration
public byte DefaultMouseCursor { get; }
Property Value
Type | Description |
---|---|
System.Byte |
DefaultObject
Get UE4 Default Object for this Class
Declaration
public static PlayerController DefaultObject { get; }
Property Value
Type | Description |
---|---|
PlayerController |
ForceFeedbackScale
Scale applied to force feedback values
Declaration
public float ForceFeedbackScale { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
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> |
HitResultTraceDistance
Distance to trace when computing click events
Declaration
public float HitResultTraceDistance { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
InactiveStateInputComponent
InputComponent we use when player is in Inactive state.
Declaration
public InputComponent InactiveStateInputComponent { get; set; }
Property Value
Type | Description |
---|---|
InputComponent |
InputPitchScale
Pitch input speed scaling
Declaration
public float InputPitchScale { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
InputRollScale
Roll input speed scaling
Declaration
public float InputRollScale { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
InputYawScale
Yaw input speed scaling
Declaration
public float InputYawScale { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
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 |
LastSpectatorSyncLocation
Last location synced on the server for a spectator.
Declaration
public Vector LastSpectatorSyncLocation { get; set; }
Property Value
Type | Description |
---|---|
Vector |
LastSpectatorSyncRotation
Last rotation synced on the server for a spectator.
Declaration
public Rotator LastSpectatorSyncRotation { get; set; }
Property Value
Type | Description |
---|---|
Rotator |
MyHUD
Heads up display associated with this PlayerController.
Declaration
public HUD MyHUD { get; set; }
Property Value
Type | Description |
---|---|
HUD |
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 |
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
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()
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 |
PlayerCameraManager
Camera manager associated with this Player Controller.
Declaration
public PlayerCameraManager PlayerCameraManager { get; }
Property Value
Type | Description |
---|---|
PlayerCameraManager |
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> |
PlayerInput
Object that manages player input.
Declaration
public PlayerInput PlayerInput { get; set; }
Property Value
Type | Description |
---|---|
PlayerInput |
SmoothTargetViewRotationSpeed
Interp speed for blending remote view rotation for smoother client updates
Declaration
public float SmoothTargetViewRotationSpeed { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
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 |
SpectatorPawn
The pawn used when spectating (nullptr if not spectating).
Declaration
public SpectatorPawn SpectatorPawn { get; set; }
Property Value
Type | Description |
---|---|
SpectatorPawn |
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
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 SourceActivateTouchInterface(TouchInterface)
Activates a new touch interface for this player controller
Declaration
public void ActivateTouchInterface(TouchInterface NewTouchInterface)
Parameters
Type | Name | Description |
---|---|---|
TouchInterface | NewTouchInterface |
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.
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.
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.
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 |
ClearAudioListenerAttenuationOverride()
Clear Audio Listener Attenuation Override
Declaration
public void ClearAudioListenerAttenuationOverride()
ClearAudioListenerOverride()
Clear any overrides that have been applied to audio listener
Declaration
public void ClearAudioListenerOverride()
ClientClearCameraLensEffects()
Removes all Camera Lens Effects.
Declaration
public void ClientClearCameraLensEffects()
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
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
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
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 |
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 |
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 |
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
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> |
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> |
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).
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> |
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> |
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> |
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> |
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> |
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> |
GetHUD()
Gets the HUD currently being used by this player controller
Declaration
public HUD GetHUD()
Returns
Type | Description |
---|---|
HUD |
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 |
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> |
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 |
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> |
GetInputMouseDelta()
Retrieves how far the mouse moved this frame.
Declaration
public (float, float) GetInputMouseDelta()
Returns
Type | Description |
---|---|
System.ValueTuple<System.Single, System.Single> |
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> |
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 |
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> |
GetSpectatorPawn()
Get the Pawn used when spectating. nullptr when not spectating.
Declaration
public SpectatorPawn GetSpectatorPawn()
Returns
Type | Description |
---|---|
SpectatorPawn |
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> |
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 |
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 |
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
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
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.
SetAudioListenerAttenuationOverride(SceneComponent, Vector)
Set Audio Listener Attenuation Override
Declaration
public void SetAudioListenerAttenuationOverride(SceneComponent AttachToComponent, Vector AttenuationLocationOVerride)
Parameters
Type | Name | Description |
---|---|---|
SceneComponent | AttachToComponent | |
Vector | AttenuationLocationOVerride |
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
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
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
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
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
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
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 |
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.
SetVirtualJoystickVisibility(Boolean)
Set the virtual joystick visibility.
Declaration
public void SetVirtualJoystickVisibility(bool bVisible)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bVisible |
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
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 |
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 SourceImplicit(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 |