0
votes

I am trying to use a USB Joystick in Unity. I am working with Unity 5.5.1 on a Windows 10 PC. The Joystick works perfectly on my machine. But in Unity, the joystick gives me some weird axis outputs.

I tried to map my joystick input with the Unity Input Manager. But it doesn't work at all. On the horizontal axis I get values from -1 to -0.6(center) to 0 to +0.6 instead of just -1 to 0(center) to 1.

Another weird thing is, that everything works just fine on my macbook. Is this a windows issue?

Did somebody else had this problem before?

1
try using latest or more recent version of unity, if it's still buggy I think you should report a bug - Nika Kasradze
also, try a different joystick - Nika Kasradze
Hi Nika, thank's for the reply. Did you use a joystick before in unity? Did it work ? - Jenny
yes and I've never had a similar problem. On windows I'd make sure that the joystick is calibrated correctly but I don't know how it is on mac :)) - Nika Kasradze

1 Answers

0
votes

I have a torrid joystick that works perfectly everywhere except unity. I've solved my issue with input.getaxis().. not being 0 by watching what was the value when the controller was set in neutral position(0.14f) and when it was set on maximum position(1.14f), and with a simple modification to the script that said something like this input.getaxis()-0.14f I've solved my problem. however, I would not recommend doing that if you are going to publish your project because that offset will be different for every user, so I would suggest writing a calibration tool that would take the offset and implement in everywhere in the game for that specific user