Win10 and Xbox One/360 Controllers

I have XBox One and 360 controllers working fine with Unity 5.1.x on Windows 8.1 and Mac OS X.X. However, XBox One controllers act a little differently on Windows 10. For example the Triggers now work similar to Mac OS X where they are independ of one another, rather than giving a combined value on the 3rd axis.

When controllers are plugged/unplugged the editor reports the controller type:

e.g. Joystick connected (“Controller (Xbox One For Windows)”) or Joystick disconnected (“Controller (Rock Candy Gamepad for Xbox 360)”).

The question is, how can I, in C# within Unity, work out which controllers are connected? The Unity Editor seems to be able to detect this.

1 Like

That sounds like a bug, could you submit one with detailed information what is exactly wrong.

ok. I’ve submitted a bug. For others, here are the details:

Create a new Input
d1_xbox_joy1_triggers
Gravity: 1
Dead: 0.2
Sensitivity: 1
Invert: True
Type: Joystick Axis
Axis: 3rd axis (Joysticks and Scrollwheel)
Joy Num: Joystick 1

Following code returns -1 to 1 on Win8.1Pro with Xbox One or Xbox 360 wired controller
pedalInput = Input.GetAxis(“d1_xbox_joy1_triggers”);

Upgrade Win8.1Pro to Win10Pro (apply all patches)
Upgrade Unity 5.1.2f1 to 5.1.3f1

Following code returns -1 to 1 for Xbox 360 controller
but returns 1 for Xbox One controller (on Win10)
pedalInput = Input.GetAxis(“d1_xbox_joy1_triggers”);

9th Axis (left trigger returns -1 to 1) - Xbox One - Win10
10th Axis (right trigger always returns 0) - Xbox One - Win10

In “Devices and Printers” on Windows 10, what has changed with Xbox One controllers is that the left trigger controls the Z Axis, and (new to Win10), the right trigger controls the Z Rotation.

The Z Axis seems to map to 9th Axis (Joysticks).

The question is, from the Unity3D Project Input manager, how do I configure the Z Rotation in 5.1.3f1?