Controller Input

→ Controller Input API

Setup

The Controller Input script can be used to assign functions to various controller and keyboard input events.

Game ControllerThis selects which controller type is showed. This setting has no effect on the working of the Controller Input. It helps to determine how the actions are assigned to buttons or various supported controllers.
Finger MovementsThis enables a built-in support for finger movements from the controller buttons. This option is only available when the Controller Input Component is attached to an humanoid.

Controllers

When Controller Type is set to anything but Keyboard, you can assign controller buttons to certain functions. Controller input is split into a left and right side. For some controllers, this corresponds to the left or right controller (e.g. SteamVR or Oculus Touch controllers). For game controllers like the Xbox Controller, this corresponds to the left and right side of the gamepad.

Note that all controllers use the same assignment. For example, setting the Left Vertical Input for one controller also changes the Left Vertical input for all other controllers.

The first field is the event type which determines when the function is called:

Neverthe function will never be called.
On pressthe function is called when the button is pressed down.
On Releasethe function is called when the button is released.
While Downthe function is called while the button is pressed.
While Upthe function is called while the button is not pressed.
On Changethe function is called when the button is pressed down or released.
Continuousthe function is continuously called independent from the button state.

Event Handler

The handling of the Controller Input is implemented using an Event Handler. You can find information on this configuration process here.