Game Controllers

A growing number of game controllers is supported natively. The following controllers are currently supported:

  • Microsoft Xbox controller (360, One)
  • Playstation4 controller
  • Steelseries XL controller
  • GameSmart controllers (e.g. MadCatz C.T.R.L.R.)
  • Sweex GA100 (Yes, it is obscure but I happen to have one 🙂

Additionally, the following hand trackers are also supported like game controllers:

  • Razer Hydra
  • SteamVR Controllers (HTC Vive)
  • Oculus Touch

To support Game controllers, you need to update the InputManager Settings. The package does contain an archive called ‘GameControllerInputSettings.zip’ which contains universal InputManager settings for a the game controllers. Move this to the ProjectSettings folder to get maximum support for your controller.

Controller Input Sides

Controllers are split in a left and right side which support the same buttons. On each side the following buttons are supported:

  • Thumbstick horizontal and vertical (float values)
  • Thumbstick button press/touch (boolean)
  • Directional Pad (Up, down, left & right) (boolean)
  • Buttons 0..3 (boolean)
  • Bumper (float value)
  • Trigger (float value)
  • Option (boolean)

For each game controller most buttons can be mapped to these buttons.

Multiple Controllers

Currently, the game controller input is limited to one game controller. A pair of Hydra, SteamVR or Touch controllers is considered as one controller. All available game controllers will be mapped to same input.

Scripting

The game controller input can be retrieved using:

Controllers.GetController(0)

PlayMaker

For PlayMaker, two action scripts are provided:

Get Controller Axis

Gets the values of the horizontal and vertical thumbstick axis

Controller Side left or right side of the controller
Store Vector the Vector3 which should store the values of the thumbstick input
Get Controller Button

Get the status of one of the game controller buttons

Controller Side left or right side of the controller.
Button the button which we want to read.
Store Bool stores the value of the button as a boolean. All buttons statuses are converted to booleans.
Store Float stores the value of the button as a float. All button statuses are converted to float values.
Button Pressed event to send when the button is pressed.
Button Released event to send when the button is released.