[SOLVED] My XBOX controller right stick is always stuck at -1.

Hey there, I’ve been struggling with this for the better part of an hour and I figured I’d post here before I go to sleep.

In unity I have RightHorizontal and RightVertical bound to Joystick axis 4 and 5 accordingly, see here:

I have these set up with a script using

  float rightMoveHorizontal = Input.GetAxis("RightHorizontal");
	float rightMoveVertical = Input.GetAxis("RightVertical");

and also using

  Debug.Log("Right Stick --- Horizontal: " + rightMoveHorizontal + ", Vertical: " + rightMoveVertical);

to read the inputs. When the debug statement outputs, it always outputs negative 1 for horizontal, and 1 for vertical (assuming 1 because I have invert checked on RightVertical. )

When I push my right stick all the way to the right, horizontal turns straight from -1 to 1, with no decimals (as opposed to the left stick, which has decimals.) the same happens when pushing the right stick all the way down, vertical turns to -1.

My left stick works fine in unity, and my right stick works fine in any other games I’ve played, as well as http://html5gamepad.com/ which I just used to test if my stick was broken.

I’ve seen this asked in the forums a few times but no one ever has an answer, so hopefully I can be that one post that people find in google when they have a problem.

Thanks in advance!


It’s really tough to google “-1”, which is why I substituted one of my -s for the word negative and tried to use descriptive language. Hopefully someone will find this in the future.

Edit: after significantly more hours of screwing around with the inputs, it turned out to be a driver I had installed for gamecube controllers called “vjoy”, changing the Joy Num to something other than 2 (which was the vjoy input number at the time) fixed it, but I also uninstalled vjoy to get around this.

I’m assuming that 4 is the triggers on the vjoy version of the xbox inputs, and that’s why it was only returning -1 or 1.

I had this issue and couldn’t figure it out for the longest time. Luckily I was just being thick-skulled.
When you make a new controller axis by increasing the amount of axes at the top of the settings it defaults the new axes to 1000 sensitivity. This is what was causing my strange outputs.

Also, don’t mix up your axes.

Had the same issue, I was also using vJoy - opening the vJoy config options an unchecking “Enable vJoy” did the trick.

I had to set both 4th and 5th axis sensitivity to 1. In fact, just use 1 sensitivity for everything, it seems like Unity and Windows 10 were both designed to use the Xbox One controller.