I have two identical AXIS T8311 Joysticks that I want to use to control two different levers that rotate on a pivot point depending on joystick orientation. Current problem is that either one of the joysticks control both levers when setting to just AXIS or Joystick Stick, or neither work when adding Usages. I have attempted to diffrentiate the joysticks with code found here and here , however, once I add “LeftHand”/“RightHand” (or whatever string I’ve tried), neither works. I’m also using the RegisterLayoutOverride to add the LeftHand and RightHand to Joysticks.
This is part of my current code:
List<InputDevice> joysticks = new List<InputDevice>();
foreach (InputDevice device in InputSystem.devices)
{
if (device.description.product == "AXIS T8311 Joystick ") //Result: finds two joysticks
joysticks.Add(device);
}
InputSystem.AddDeviceUsage(joysticks[0], "LeftHand");
InputSystem.AddDeviceUsage(joysticks[1], "RightHand");
The joysticks do seem to have a usage of “LeftHand” when checked through joysticks[0].usages[0], however, neither joystick has a usage when looked through the Input Debugger.
By using:
List<InputDevice> joysticks = new List<InputDevice>();
foreach (InputDevice device in InputSystem.devices)
{
InputSystem.AddDeviceUsage(device, "UsageTest");
}
Keyboard and Mouse do get a “UsageTest” Usages added, however, neither of the joysticks do. Any idea why this is? Could there be something obvious I’m missing?