Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerInput.h |
Include |
#include "GameFramework/PlayerInput.h" |
class UPlayerInput : public UObject
Object within PlayerController that processes player input. Only exists on the client in network games.
Name | Description | ||
---|---|---|---|
|
TArray< struct ... |
ActionMappings |
This player's version of the Action Mappings |
|
TArray< struct ... |
AxisConfig |
This player's version of the Axis Properties |
|
TArray< struct ... |
AxisMappings |
This player's version of Axis Mappings |
|
TArray< struct ... |
DebugExecBindings |
Generic bindings of keys to Exec()-compatible strings for development purposes only |
|
InvertedAxis |
List of Axis Mappings that have been inverted |
|
|
MouseSamples |
Current average mouse movement/sample |
|
|
float |
MouseSamplingTotal |
Number of mouse samples since mouse movement has been zero |
|
float[2] |
SmoothedMouse |
How long received mouse movement has been zero. |
|
FVector[EKeys::... |
Touches |
Touch locations, from 0..1 (0,0 is top left, 1,1 is bottom right), the Z component is > 0 if the touch is currently held down |
|
TouchEventLocations |
Used to store paired touch locations for event ids during the frame and flushed when processed. |
|
|
float[2] |
ZeroTime |
Mouse smoothing sample data. |
Name | Description | |
---|---|---|
|
UPlayerInput() |
Name | Description | ||
---|---|---|---|
|
AddActionMapping ( |
Add a player specific action mapping. |
|
|
AddAxisMapping ( |
Add a player specific axis mapping. |
|
|
AddEngineDefinedActionMapping ( |
Add an engine defined action mapping that cannot be remapped. |
|
|
AddEngineDefinedAxisMapping ( |
Add an engine defined axis mapping that cannot be remapped. |
|
|
ClearSmoothing() |
Exec function to reset mouse smoothing values |
|
|
ConditionalInitAxisProperties() |
Initialized axis properties (i.e deadzone values) if needed |
|
|
DiscardPlayerInput() |
Rather than processing input, consume it and discard without doing anything useful with it. |
|
|
DisplayDebug ( |
Draw important PlayerInput variables on canvas. |
|
|
Exec ( |
Exec handler |
|
|
ExecInputCommands ( |
Execute input commands within the legacy key binding system. |
|
|
FlushPressedActionBindingKeys ( |
Flushes the current key state of the keys associated with the action name passed in |
|
|
FlushPressedKeys() |
Flushes the current key state. |
|
|
ForceRebuildingKeyMaps ( |
Clear the current cached key maps and rebuild from the source arrays. |
|
|
GetAxisProperties ( |
Gets the axis properties for a given AxisKey. |
|
|
GetBind ( |
Returns the command for a given key in the legacy binding system |
|
|
const TArray... |
GetEngineDefinedActionMappings() |
|
|
const TArray... |
GetEngineDefinedAxisMappings() |
|
|
GetExecBind ( |
Get the legacy Exec key binding for the given command. |
|
|
GetInvertAxis ( |
Returns whether an Axis Mapping is inverted |
|
|
GetInvertAxisKey ( |
Returns whether an Axis Key is inverted |
|
|
GetKeyMapBuildIndex() |
||
|
const TArray... |
GetKeysForAction ( |
Returns the list of keys mapped to the specified Action Name |
|
const TArray... |
GetKeysForAxis ( |
Returns the list of keys mapped to the specified Axis Name |
|
const FKeySt... |
GetKeyState ( |
|
|
FKeyState &#... |
GetKeyState ( |
|
|
GetKeyStateMap() |
||
|
float |
GetKeyValue ( |
|
|
float |
GetMouseSensitivityX() |
Returns the mouse sensitivity along the X-axis, or the Y-axis, or 1.0 if none are known. |
|
float |
GetMouseSensitivityY() |
Returns the mouse sensitivity along the Y-axis, or 1.0 if none are known. |
|
GetProcessedVectorKeyValue ( |
||
|
float |
GetRawKeyValue ( |
|
|
GetRawVectorKeyValue ( |
||
|
float |
GetTimeDown ( |
|
|
UWorld * |
GetWorld() |
|
|
InputGesture ( |
Handles a gesture input event. Returns true. |
|
|
InputKey ( |
Handles a key input event. Returns true if there is an action that handles the specified key. |
|
|
InputMotion |
Handles a motion input event. Returns true. |
|
|
InputTouch ( |
Handles a touch input event. Returns true. |
|
|
InvertAxis ( |
Exec function to invert an axis mapping |
|
|
InvertAxisKey ( |
Exec function to invert an axis key |
|
|
IsAltPressed() |
||
|
IsCmdPressed() |
||
|
IsCtrlPressed() |
||
|
IsKeyHandledByAction ( |
||
|
IsPressed ( |
||
|
IsShiftPressed() |
||
|
float |
MassageAxisInput ( |
Given raw keystate value, returns the "massaged" value. |
|
MassageVectorAxisInput |
Given raw keystate value of a vector axis, returns the "massaged" value. |
|
|
ProcessInputStack ( |
Process the frame's input events given the current input component stack. |
|
|
RemoveActionMapping ( |
Remove a player specific action mapping. |
|
|
RemoveAxisMapping ( |
Remove a player specific axis mapping. |
|
|
SetAxisProperties ( |
Gets the axis properties for a given AxisKey. |
|
|
SetBind |
Exec function to add a debug exec command |
|
|
SetMouseSensitivity ( |
Sets both X and Y axis sensitivity to the supplied value. |
|
|
SetMouseSensitivity ( |
Exec function to change the mouse sensitivity |
|
|
float |
SmoothMouse |
Smooth mouse movement, because mouse sampling doesn't match up with tick time. |
|
Tick ( |
Per frame tick function. Primarily for gesture recognition |
|
|
UpdatePinchStartDistance() |
Manually update the GestureRecognizer AnchorDistance using the current locations of the touches |
|
|
WasJustPressed ( |
||
|
WasJustReleased ( |
Return true if InKey went from down to up since player input was last processed. |
Name | Description | ||
---|---|---|---|
|
PostInitProperties() |
Called after the C++ constructor and after the properties have been initialized, including those loaded from config. |
Name |
Description |
---|---|
EngineDefinedActionMappings |
Action Mappings defined by engine systems that cannot be remapped by users |
EngineDefinedAxisMappings |
Axis Mappings defined by engine systems that cannot be remapped by users |
NoAxisMappings |
Static empty array to be able to return from GetKeysFromAxis when there are no axis mapped to the requested axis name |
NoKeyMappings |
Static empty array to be able to return from GetKeysFromAction when there are no keys mapped to the requested action name |
Name | Description | ||
---|---|---|---|
|
float |
GetMouseSensitivity() |
Call axis specific GetMouseSensitivityX or GetMouseSensitivityY instead. |
|
GetVectorKeyValue ( |
Use GetProcessedVectorKeyValue or GetRawVectorKeyValue instead. GetRawVectorKeyValue will have the same result as GetVectorKeyValue previously. |
|
|
InputAxis |
InputAxis has been deprecated, please use the version of InputKey which takes in FInputKeyParams |
|
|
InputKey ( |
This version of InputKey has been deprecated, please use that which takes in FInputKeyParams |
|
|
InputTouch ( |
InputTouch now takes a Force |