Custom HID Setup

Hi everyone,

We’re currently working on a small project for an interactive booth which will make use of a flightstick for control which isn’t being properly detected by the input system, so it seems we will need to set it up as a custom HID.

From reading online, it looks like its possible to create a custom input device, but I’m not sure exactly how to go about that from reading the documentation. For example, where does the existing JSON exist in which you can modify to add your own devices? etc.
https://docs.unity3d.com/Packages/c…nual/HowDoI.html#create-my-own-custom-devices

Any help would be greatly appreciated! :smile:

Would recommend starting here.

Thanks Rene-Damm!

That helped, and we were able to get our joystick recognized by the input system. However, it seems to be outputting odd values for the x/y axis. It’s a bit hard to explain, but:

  • The default value is 1 even though we’ve defined the normalizedZero = 0.5
  • Left goes from 1 - 0, but ends prematurely (about 50% of the way)
  • Right goes from -1 - 0, but ends prematurely (about 50% of the way)
  • The same issue happens with Down/Up

I should mention that by default, the joystick was attempting to use SBIT format. We’ve switched it to Byte just to “get it to work”, but I wonder if that’s playing into the issue? Regardless, it still throws these two errors when recompiling the editor:

Could not re-recreate input device 'Thrustmaster, Inc. USB Game Controllers (HID)' with layout 'ThrustmasterJoystrickHID' and variants 'Default' after domain reload

Exception: State format 'SBIT' is not supported as floating-point format

Any insight would be great, thanks!