Why is this happen : Input.GetAxis("Horizontal") return -1
void Update()
{
Debug.Log(Input.GetAxisRaw("Horizontal"));
}
When I run this test, The Input test return -1 even when I didn't push any button on keyboard. Strangely, it returns 0 when I clicked console window.
Why is this happen? and how I can fix it?
Comment
This is very wierd. Is it a blank project? Is it a fresh install of unity?
I have same kind of problem, but with Input.GetAxis() both horizontal and vertical. My character suddenly ran off but when i restart it works fine. debugged and found no error in the code.
After a while i started another project running the same Unity version, 2021.2.7f, had the same problem there. Updated to 2021.2.10f with no different result. No Issue in projects running 2020 version. What version are you running?
Your answer
