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

How do I create a new axis with left shift as positive?

Discussion in '2D' started by El_barto8, Jun 11, 2022.

Thread Status:
Not open for further replies.
  1. El_barto8

    El_barto8

    Joined:
    Oct 22, 2020
    Posts:
    8
    Hello, im trying to make a rpg game and i want my player to sprint. So I go to input manager, add a new axis and call it sprint and set the positive button to "left shift". Although it doesnt work as intended, im using the
    Code (CSharp):
    1. Input.GetAxisRaw("Sprint")
    function and using Debug.Log the values were always zero

    (Sorry for my bad english)
    Thanks
     
  2. El_barto8

    El_barto8

    Joined:
    Oct 22, 2020
    Posts:
    8
    I realized by myself that I set the axis as a Joystick Axis and not as a Keyboard or Mouse buttonI hope this could help someone in the future and save time, or im just dumb and i didnt know that i had to do that
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,620
    This is the wrong forum to talk about input; 2D has nothing to do with this subject. In the future, please use a more appropriate forum such as the scripting forum.

    Thanks.
     
    El_barto8 likes this.
Thread Status:
Not open for further replies.