- Home /
My gamepad axes data is somebody elses, or CMB?
I've tried an XBox 360 controller and it was useless. So I tried the classic XBox S controller with XBCD thinking the extra control would save the day, it hasn't.
Basically the raw data I get with Input.GetAxisRaw(asix_n) is just, well, it's wrong.
Take the X axis for example on the left stick. Windows shows me the pretty graphic perfectly, no significant noise, all fun. I calibrate it for lulz, still fine. XBCD control panel graphics report it perfectly too. Then I try in Unity. Mental.
The range reality reports, which in this case includes Windows, is a smooth -1 to 1 left to right, resting at 0 in the center.
The range Unity reports is 1 at the left to 1 center (as in, left of center useless), then -1 to 1 from the center to the right.
Is there a way to get closer than Input.GetAxisRaw - because obviously Unity is taking a brief detour through interdimensional spacetime to translate what Windows input is telling it (which conveniently happens to be the truth)?
Please make me happy face.
Answer by sanderbontje · Dec 24, 2010 at 12:29 PM
The same happened to me with a regular MS Sidewinder joystick when switching from Unity 2.6 to 3.1.0f4. Use the registry hack provided by andeeee (http://forum.unity3d.com/threads/58016-Joystick-calibration?p=372111&viewfull=1#post372111) to force Unity to use DirectInput instead of the default RawInput.
Answer by Jean-Fabre · Apr 19, 2011 at 07:33 AM
Hi,
If andeee registry hack is not helping, have you calibrated your joystick?. I lost quit sometime on that as well... :)
Bye,
Jean
Thank you for this. I fixed it with the registry hackery in the end, but I hadn't been back here since. I forgot about this post, I apologise. :-)
i have this exact issue but andeee registry hack is not working it causes GetAxis and GetAxisRaw to just return 0 in all cases. i have tried to calibrate and it looks fine in windows.
Your answer
Follow this Question
Related Questions
Unity ignoring joysticks of specified number 0 Answers
Xbox controller joystick axis small movements? 1 Answer
How do switch control for canvas using joystick? 0 Answers
How do I add input for two different local players? 1 Answer
Get Joystick Input ( for example KeyCode.Joystick1Button0) inside Editor Mode 2 Answers