Search Unity

How to get ANALOG input values similar to GetAxis("Horizontal") with WASD keys ?

Discussion in 'Input System' started by kris8360, Aug 9, 2020.

  1. kris8360

    kris8360

    Joined:
    Jan 11, 2013
    Posts:
    34
    Hi, my main problem with the new input system, is that I cannot seem to reproduce the smooth controls of the old input system.

    I want to get my input the same way as before, using Input.GetAxis("Horizontal / Vertical") with the WASD keys is purely digital now with the new system, meaning its either 0, or 1 (or -1) but no values between.
    In the old Input system you could configure, to take a copule of frames to go from 0 to 1, and I want this very same function for smooth controls, if it is possible.

    It doesn't matter if I set the mode to Analog or Digital in the input action asset, the end result is the same, and it is driving me crazy. Why change that was working before?

    Anyone managed to restore this functionality, or knows how to do it? I would really appreciate it.
    Thx for reading.
     
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    There's no support yet for interpolating input over time to simulate the "gravity" setting in the input manager. It's on the list and coming.

    The actions react to input quite literally ATM and don't yet have support for "making up" input that isn't there.
     
  3. kris8360

    kris8360

    Joined:
    Jan 11, 2013
    Posts:
    34
    All right, fortunately, there is an option to use both the new and old input system, so I can use the old Input.GetAxis, for the movement only, and the new system for everything else.
     
    aemason likes this.
  4. B4ttleCat

    B4ttleCat

    Joined:
    Mar 31, 2014
    Posts:
    18
    Bummer to hear this isn't a thing yet. It would be handy to get it back as it was a big time saver for getting basic smoothing for beginners like myself.