Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

GetAxis positive key is negative value?

Discussion in 'Scripting' started by Hero101, Jul 17, 2015.

  1. Hero101

    Hero101

    Joined:
    Jul 14, 2015
    Posts:
    150
    Hey guys,

    I was debugging my Input.GetAxis("Vertical") as I'm learning to create controls to move my character and I know it ranges from -1 to 1. But in the inspector the w, or up, key is the positive button yet while debugging it when I press those keys it returns a negative value. Is that normal?
     
  2. Hero101

    Hero101

    Joined:
    Jul 14, 2015
    Posts:
    150
    Ok it's not normal...can anyone tell me why I get a negative value in the positive button?
     
  3. calmcarrots

    calmcarrots

    Joined:
    Mar 7, 2014
    Posts:
    681
    Check you Input manager for your "Vertical" axis. The 'inverted' check box should be enabled.

    Capture.PNG
     
  4. Hero101

    Hero101

    Joined:
    Jul 14, 2015
    Posts:
    150
    Man I feel stupid.... Thank you.
     
    calmcarrots likes this.
unityunity