The Input object allows users to connect a gamepad, keyboard, or XR controller as a trigger input in the State Machine.
As of today, 5 devices are supported for Inputs:
To enable custom button mapping as input, you first need to add an Input object into your scene. There are two options for adding an Input to a scene:
You can add an Input from the objects menu on the top bar.
You can also add an Input by typing “input” in the Command Center.
Inputs offer the ability to bind keys and buttons to actions. These actions can be used in the state machine to trigger events.
Once an Input object is selected in the scene, you can set actions in the Input properties panel. By default, there are 4 actions available and three platforms: Desktop, gamepad, and XR.
You can add an action by clicking the ‘plus’ button on the top right, or remove an action with the ‘minus’ button.
You can also disable Inputs with the power icon.
Actions can be set by drop downs.
Drop downs next to each platform show all available button options.
To use Inputs in the State Machine, simply select your transition, and select “Input start” or “Input end”. “Input start” signifies when a button is pressed down, and “Input end” signifies when a button is released.