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

Can't figure out how to do stick deadzones

Discussion in 'Input System' started by PhilSA, Oct 22, 2019.

  1. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
    I want to apply a deadzone to a gamepad stick. Here's how I do it:
    1. In my input actions asset, I create a "Move" action. Of ActionType "Value" and ControlType "Any"
    2. I add a binding to "Move" that binds it to <Gamepad>/leftStick
    3. On that binding I add a "Axis Deadzone" processor of min 0.5 and max 1
    4. I save my asset
    5. In the code, I get the value of my Move like this
      Code (CSharp):
      1. Vector2 moveInput = InputActions.DefaultActionsMap.Move.ReadValue<Vector2>();
    But the deadzone isn't working, because my move stick is still super sensitive

    What am I doing wrong?
     
  2. TRS6123

    TRS6123

    Joined:
    May 16, 2015
    Posts:
    246
    There should be a processor called "Stick Deadzone". If you can't find it, try changing your control type to Vector2
     
  3. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
    That was it! thanks