Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Implement Joystick Hat Input

Discussion in 'Input System' started by T3ddyTheGiant, Aug 14, 2019.

  1. T3ddyTheGiant

    T3ddyTheGiant

    Joined:
    Aug 1, 2018
    Posts:
    11
    Having trouble receiving hat selector input from my joystick [logitech extreme 3d pro]. I notice a hatswitch is available in the binding path selector (as shown in the provided image), but it appears Unity does not recognize hat input from the joystick after having investigated the player input debugger component.

    The old input system, I believe, mapped the hat to the 5th and 6th axis respectively. Is this a situation where I need to use both input systems for the time being?
     

    Attached Files:

    • hat.png
      hat.png
      File size:
      11.7 KB
      Views:
      485
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    ATM the HID fallback only recognizes a hatswitch if it is explicitly marked as such by the HID. Which, as most things with HID go, isn't something that a whole lot of devices do.

    When you plug in the device and double-click it in the input debugger (Window >> Analysis >> Input Debugger), you should be able to use the hatswitch and see which controls end up getting used. You should be able to bind to those specifically.

    Once we have wider support for devices (for 1.0, we support only a fairly small set), the Logitech Extreme 3D Pro joystick should be supported properly out of the box.