Search Unity

Motion Controller Input Changes

Discussion in 'VR' started by IElectric, Apr 28, 2019.

  1. IElectric

    IElectric

    Joined:
    May 31, 2016
    Posts:
    215
    Hello, I have updated my project to Unity 2019.1 and I have a strange behavior on motion controller input, in detail Touchpad Press works as "touch" instead of "press", in the prior version of Unity like 2018.3 works properly. The menu button stop working for each controller in Unity 2019.1 but works on Unity 2018.3, I don't know why, Thank you, Best regards…
     
    Last edited: Nov 30, 2020
  2. jackpr

    jackpr

    Unity Technologies

    Joined:
    Jan 18, 2018
    Posts:
    50
    Hi there IElectric, this looks like the WindowsMR chart, is that correct? Between 18.3 and 19.1 we have changed the mapping as part of our effort to have the indices match across platforms. You can refer to this manual page for the updated mappings across all platforms: https://docs.unity3d.com/2019.1/Documentation/Manual/xr_input.html.

    I also encourage you to look at our InputDevices API:
    https://docs.unity3d.com/2019.1/Documentation/ScriptReference/XR.InputDevices.html
    and https://docs.unity3d.com/2019.1/Documentation/ScriptReference/XR.InputDevice.html

    The xr_input manual page linked above has examples of using these APIs. XR ran out of buttons and axes in the InputManager, so the InputDevices API is our new solution. These APIs aim to give you more insight into the status of the device by querying for capabilities and status at runtime rather than making assumptions at compile time. It's all in the name of allowing you to target all the XR SDKs as easily as possible.

    InputDevices gains deviceConnected and deviceDisconnected events in 19.2, but in 19.1 you can use the node events in XR.InputTracking to know when devices are added or removed.

    I hope you'll find that our new APIs serve your better!
     
  3. IElectric

    IElectric

    Joined:
    May 31, 2016
    Posts:
    215
    OK, thank you for your reply, I will try to use the new input API, Cheers...