Allows querying of player button presses and other inputs.
ActionNames |
Names of all actions from the current game's input settings. |
AnalogLook |
Analog look value from the default input device. This is scaled by Preferences.Sensitivity - so you don't need to scale it afterwards. |
AnalogMove |
Analog move value from the default input device. |
ControllerCount |
How many controllers are active right now? |
EnableVirtualCursor |
Whether or not the Virtual Cursor should show when using a controller. Disable this to control the cursor manually. |
EscapePressed |
True if escape was pressed |
MotionData |
Current state of the current input device's motion sensor(s) if supported.
This is only supported on: Dualshock 4+, Switch Controllers, Steam Controller, Steam Deck. |
MouseCursorVisible |
True if the mouse cursor is visible (using UI etc) |
MouseDelta |
Movement delta from the mouse. |
MouseWheel |
The state of the mouse wheel. |
Suppressed |
If the input is suppressed then everything will act like there is no input |
UsingController |
Was the last button pressed a game controller button? |
VR |
Virtual Reality specific input data. |
Clear |
Remove this action, so it's no longer being pressed. |
ClearActions |
Clears the current input actions, so that none of them are active. |
Down |
Action is currently pressed down |
GetActions |
Copies all input actions to be used publicly |
GetAnalog |
An analog input, when fetched, is between -1 and 1 (0 being default) |
GetButtonOrigin |
Returns the name of a key bound to this InputAction
<example>For example:
<code>Input.GetButtonOrigin( "Undo" )</code>
could return <c>SPACE</c> if using keyboard or <c>A Button</c> when using a controller.
</example> |
GetGlyph |
Get a glyph texture from the controller bound to the action.
If no binding is found will return an 'UNBOUND' glyph. |
GetGroupName |
Finds the Sandbox.InputAction.GroupName of the given action. |
PlayerScope |
Push a specific player scope to be active |
Pressed |
Action wasn't pressed but now it is |
ReleaseAction |
Releases the action, and it won't be active again until it's pressed again. |
ReleaseActions |
Clears the current input actions, so that none of them are active. Unlike ClearActions
this will unpress the buttons, so they won't be active again until they're pressed again. |
Released |
Action was pressed but now it isn't |
SetAction |
|
StopAllHaptics |
Stop all vibration events on the current controller. |
TriggerHaptics |
Trigger a haptic event on supported controllers including Xbox trigger impulse rumble. |