GetButton Always returns true
Hello guys, I'm new to unity and I have this problem which is strange.
First of all I followed an answer to create an input in the input manager, the name is Sprint and I changed the positive button to "left shift" everything else is the same.
Then used get button function to detect if the button is currently pressed, this is what I put in the update function:
if(Input.GetButton("Sprint"))
Debug.Log("Clicked");
else
Debug.Log("Released");
At first when I hit play it says "Released" on the debug log, and when I press the shift button it says "Clicked" and keeps returning true for getButton, so even when I release the shift key it keeps printing "Clicked"
I honestly do not know what is going on, the only guy with the same problem is here:
http://answers.unity3d.com/questions/868548/getbutton-always-return-true.html
But there is no answer.
Your answer
Follow this Question
Related Questions
How to set this to GetButton? 0 Answers
how to get dice number in ui text 2 Answers
Break a GetButton 0 Answers
The bolt on "Shooting shots" won't appear 1 Answer
GetButtonUp works but not always 0 Answers