Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question [Unity 2019.3.11f1 to 13f1] Cannot listen or bind Left Stick/Right Stick only

Discussion in 'Input System' started by MlleBun, May 13, 2020.

  1. MlleBun

    MlleBun

    Joined:
    Sep 19, 2017
    Posts:
    163
    Hello,

    Left Stick [GamePad] and RightStick [GamePad] cannot be selected in the bindings.

    Project's parameters created on versions before 11f1
    upload_2020-5-13_20-26-6.png

    Now
    InputSystem.gif

    I could override the binding like this, without knowing if it would cause bugs later in my scripts. Any idea if it's an actual bug or has there been a change of behaviour since previous versions ? Thanks!

    InputSystem2.gif
     
  2. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    It's looking for a float type control so the Vector3 control isn't selectable. In your case, I assume "Move" is set to action type "Value" and control type "Axis".
     
  3. MlleBun

    MlleBun

    Joined:
    Sep 19, 2017
    Posts:
    163
    Hi @Rene-Damm , no it's Pass Through (which has not changed since prior versions). Should I change Axis to Vector3 ?

    upload_2020-5-14_19-21-57.png

    EDIT : Changing Axis to Vector3 show other bindings than Gamepad. And changing Pass Through to Value does not give me access to Left Stick only.
    upload_2020-5-14_19-24-31.png
     
  4. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Yup, that's the bit that makes it go down the picker gray out the sticks. It sees "Axis" and looks at the stick (Vector2) and sees an incompatible type.

    If you want the action to be able to bind to any type of control, you can switch it to "Any". In that case, the picker should not be filtering out controls anymore.

    Alternatively, for stick type controls set it to "Vector2" or "Stick" (the latter is more restrictive).
     
    MlleBun likes this.
  5. MlleBun

    MlleBun

    Joined:
    Sep 19, 2017
    Posts:
    163
    Got it ! The parameters to put are : Pass Through and Stick (or Vector2).
    If I put Value instead of Pass Through on the camera input (I'm using a Cinemachine Free look camera), the camera rotation updates continuously and you'll have a camera that keeps rotating forever once you pushed the stick. Pass Through seems to be the best option.