- Home /
Input.GetAxisRaw returns -1 when it should return 0
Input.GetAxisRaw returns -1 when I am not touching the joy stick. It returns 1 when I move the stick all the way to the right. It returns -1 when I move it all the way to the left.
Does anyone know what might be causing this?
Thanks.
Hey Doug, if you disconnect your gamepad, are you still receiving -1 ? It might be an issue with your hardware.
Is there anything special about your code or axis setup? Try in a new and otherwise empty project maybe
Answer by doug66 · Oct 09, 2018 at 12:44 AM
One more thing... GetAxisRaw never returns anything but -1 or 1 even when I move the joystick half way to the right or left.
It works fine on my Windows 7 machine which has Unity installed. It does not work on my Windows 10 machine which does not have Unity installed. I tested the joystick under device properties. The test correctly shows the movement of the joystick.
Your answer
![](https://koobas.hobune.stream/wayback/20220612180019im_/https://answers.unity.com/themes/thub/images/avi.jpg)