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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug 1.4.1 returns axis when rebinding instead of button

Discussion in 'Input System' started by Hertzole, Jul 31, 2022.

  1. Hertzole


    Jul 27, 2013
    I've discovered a regression with the latest version of the input system where it returns the whole axis instead of the button/direction when rebinding using a gamepad.
    In 1.3.0, pushing any stick to the left would give me <Gamepad>/leftStick/left but now it instead returns <Gamepad>/leftStick/x. This makes it incredibly hard to set up precise rebinds.

    I've submitted a bug report about this, IN-11956. In the meantime, my only choice is to stick with the 1.3.0 and cherry-pick some fixes myself because a large chunk of my rebind system does not work with 1.4.1.

    If this by any chance is by design, what would be the proper way to get the old better behavior back?
  2. andrew_oc


    Unity Technologies

    Apr 16, 2021
    You can specify in your rebinding operation that it should only consider buttons, and then <Gamepad>/leftStick/left/right/up/down should come through and leftStick/x and leftStick/y will be ignored. Add the following call to your rebind operation:
    Code (CSharp):
    1. .WithExpectedControlType<ButtonControl>()
    romi-fauzi and Hertzole like this.
  3. romi-fauzi


    Aug 16, 2013
    Boy am I glad to came across this threads, after frustrated trying to solve similar issue on my end, I do really hope this is documented much more clearly in the documentation.