Input Objects
Control and interact with prototypes using gamepads, keyboards, or XR controllers.
Using Input objects
Input objects define the input device and keys/buttons attached to an action. These actions are used in the State Machine to trigger an event.
Input object device types
Input object device types
Five devices are currently supported as Input objects:
-
Nintendo Switch
-
Xbox
-
PlayStation 5
-
Keyboard and mouse
-
Quest-based controllers
Adding Input objects to a scene
Adding Input objects to a scene
Input objects can be added to a scene in two ways:
-
Open the Command Center, type “input”, and select Inputs from the dropdown
-
Open the Objects menu in the top toolbar and select Inputs from the dropdown
Input object properties
Attaching Input objects to actions
Attaching Input objects to actions
Open the Input section in the Properties panel
-
Select the Input object in the Hierarchy or directly in the scene
-
The Input section of the Properties Panel will automatically appear
By default, there are three platforms (Desktop, Gamepad, XR) available for each Input object.
-
Toggle between the platforms by selecting each name in the Properties Panel
-
Use the dropdown to define the Input object property for each action
Adding and removing actions
Adding and removing actions
Open the Input section in the Properties panel, then:
-
Click the + icon to add an action for all platforms
-
Click the - icon to remove a specific action from all platforms
Disabling Input properties
Disabling Input properties
Open the Input section in the Properties panel and click the power icon to disable Inputs.
Using Inputs in the State Machine
Familiarize yourself with how to use the State Machine before incorporating Inputs.
In the State Machine, use ‘Input start’ and ‘Input end’ to signify when an action in triggered.
Step 1
Select State Machine in the bottom bar to open the State Machine panel.
Step 2
Click a State transition to open the Events popover.
Step 3
Click the dropdown and select ‘Input start’ or ‘Input end’.
-
‘Input start’ signifies when a button is pressed down
-
‘Input end’ signifies when a button is released
Step 4
If there are multiple Inputs in a scene, select the desired one from the ‘Inputs’ dropdown.
Step 5
Select the desired action in the ‘Action’ dropdown.