Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Input.GetAxis

Discussion in 'Input System' started by kamber0ff, Mar 8, 2023.

  1. kamber0ff

    kamber0ff

    Joined:
    Dec 17, 2022
    Posts:
    6
    So you know how you can do this
    Input.GetAxis("Vertical")
    to get a number for -1 to 1 when you are pressing W and S for example
    My question is how can I do this but for other keys like the arrow keys
     
  2. Homicide

    Homicide

    Joined:
    Oct 11, 2012
    Posts:
    657
    Create a new Input setting in the Input Manager. Project Settings / Input. Use a positive, and negative key. Copy the general setup from one of the existing axis.