- Home /
When I move the joystick and then release it, the input is not 0.
I am learning how to use Unity and I move a character with an Xbox one controller. But when I move the character and then stop it, he continues to move. I used Debug.Log to see the outputs and the controller (after I moved the character and then released the joystick) is outputting numbers like 0,34579972.
if that's what the raw output from the Input class is, then it's a hardware or driver issue, maybe worn out thumbstick. You could compensate it defining a deadzone.
Answer by J-F · Jul 16, 2018 at 11:59 AM
You can try the method mentioned above, Or if you are using the unity Input axis, then you can go to "Edit/Project Settings/Input" Then select the axis you are using and increase the "Dead" value.
So now Input.GetAxis("Horizontal"); will not return anything under the value set in the "Dead" variable