- Home /
Joystick gamepad input overly sensitive
Hi all,
Context: I'm currently trying to build a platformer which differentiates between walk / run based on the magnitude of the vector returned by the horizontal joystick input on a gamepad. I'm currently using a 3rd party controller (hori switch gamepad), but this issue also happens with my switch pro controller.
Problem: When I move the control stick just slightly, it ends up reaching the max value (1 or -1) very quickly after only moving the joystick 1/3 of the actual distance it can actually travel. I've been using getaxis and getaxisraw to debug.log the horizontal values - both seem to return the same numbers.
What I would expect to see is a more natural gradient/progression from the center of the joystick reporting 0, 0.1, 0.2, etc. until the joystick reaches the very edge, but instead it snaps quickly to 1 or -1. All of the values in the input manager have been left as default. I've tried playing with the sensitivity, but it doesn't seem to help.
Anyone able to help? I've seen a few threads with similar issues, but no one seems to have an answer. I was also curious to know if the rewired input manager may solve this issue.
Answer by SpaceAnimal03 · Apr 22, 2020 at 08:25 PM
Found out that it had to do with the controller I was using (the ps4 controllers seemed to work fine). Seems that The hori pad switch controller and also the wireless switch pro controller both have issues with reporting the correct numbers on their analog sticks. The numbers reported can be affected by having steam run concurrently while unity is open since steam applies its own config for the controllers. I tried to use x360ce to fix the issues but it doesn't seem to work still.
Does anyone have any information on how to get the switch controllers to report the correct numbers here? are there any proper drivers for them?
I found that when using dolphin emulator to set up the controller there was an improvement in the reporting of the axis values, though still incorrect.
Also, someone has made a program that can detect joycons and pro controller on pc https://github.com/$$anonymous$$obot/BetterJoy It didn't help me in particular but could prove useful for others.
https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Gamepad.html >> this documentation may also be useful for those facing similar issues
Your answer
Follow this Question
Related Questions
VSync and Joysticks 1 Answer
gamepad input sensitivity 0 Answers
Slow down and play walk animation on left shift? 3 Answers
Animation problem (noob) 1 Answer
Character controller with key click to move forward 0 Answers