- Home /
Joystick Input.getaxis incorrect values problem
Thanks in advance for any advice you can provide. I am trying to Set up joystick hardware to work within Unity 4.3.2. Joystick is "Black Widow". Normally under input for Joystick the values obtained from Input.GetAxis ("Horizontal") and Input.GetAxis ("Vertical") should range from -1 to 0 to 1, however the problem is with both axis the default/stationary position starts off as 0, but after moving the joystick in any direction and allowing it to return to central/stationary position it becomes -1 and never resets to 0 again. For example, Input.GetAxis ("Vertical") when the stick is pushed forward it reads 1 then returns to a central position value of -1 with no values displayed inbetween. Pushing the stick backwards/down the values range from -1 to 0 to 1 with everything inbetween. I want value to be -1 when stick is pulled fully back, 0 when central/stationary and 1 when stick is pressed fully forward and everything inbetween. I have attached a screen grab of my input settings.
Thanks again, James.
I'm having the same problem, although I've just discover that when central/stationary, and click on the game window/Console window, the output change suddenly from -1 to 0, and vice versa.
Answer by meat5000 · Dec 11, 2014 at 04:25 PM
Toggle "Snap" checkbox, see if there's any effect
Check the mouseclick dropdown to see if it is set up for similar Type, axis and Joy Num