[Gamepad] leftstick movement seems extra noisy in or near deadzone.
Commit 7948ead, Win10 64, 2018.2b1 XBOX One Controller, XBOX 360 Controller (both USB).
Repro 7/7
If I don't use the dpad, I can use the buttons (with TapModifiers) as normal, but the leftstick (haven't tested rightstick) feels noisy near the dead zone, even for very slight movement (less than a normal movement response).
I'm able to get this by just barely tapping on my XBOX one controller, with enough force to move the stick and stopping immediately. The 360 has worse drift but it's old and has started to slip to the left a bit. The XBOX One controller is new and factory-calibrated. I am using the default dead zone settings.
I was able to repro as well with an XboxOne controller. Takes a few tries, but the demo scene camera will continue moving sometimes after letting go of the stick. I'm taking a look now for the fix.
Probably same issue as https://github.com/Unity-Technologies/InputSystem/issues/2. My guess is more towards the state system than the deadzoning.
Have some more info about reproducibility. I have been using the Demo to repro. When I change back to old input system. Can't reproduce. Also can't reproduce on the look stick, m_look both horizontal and vertical axis of the look stick (in demo right stick) is fine. Absolutely can't repro the look drift. I can't reproduce with the vertical axis at all. However 100% reproducible with the horizontal axis only on m_Move. What happens is, if the input is very, very small. Very lightly put the slightest amount of pressure on the horizontal axis, and let go, the transform X and Z values go nuts on Player object , however the M_move vector is 0,0 every frame. But put more than the slightest pressure. Everything is fine.
So my guess was wrong. Doug (@piconid) found that it's really just bad deadzone values. We have a global deadzone default which hasn't seen extensive testing and even if it happens to be a good default, will need tweaking on a per-controller basis. Xbox controllers are pretty wobbly whereas DualShocks, for example, aren't.
We'll tweak the deadzones and that should fix this issue and #2.
Should be fixed as of https://github.com/Unity-Technologies/InputSystem/commit/223547c263395c835061588a665c379ddc9ede38.
Still happening on Mac OSX. 2018.2b7, using commit 25ad430d08d01b213209ada6d322d375d9202706.
Wait, I'm using InputActions to handle movement,
from this bit in the InputAction summary:
/// Processors on controls are NOT taken into account by actions. A state is /// considered changed if its underlying memory changes not if the final processed /// value changes.
Does that mean actions don't automatically take deadzone into account? Is there a proper way to deal with noisy inputs with actions?
That part comes down to interactions (previously called modifiers). If there's interactions on the binding, they will have the ultimate say when and how an action triggers. If there's none, the action just blindly responds to any value change.
However, other than the action triggering inside the deadzone, too, the actual value that you get when doing a ReadValue on the action context should be the final deadzoned value. So, say you have a move action bound to <Gamepad>/leftStick without any interactions applied to the binding, then any stick movement, even if within the deadzone, should cause a move.performed callback. However, if you do a ReadValue from within that callback, it should return (0,0) while within the deadzone.
OK, that seems consistent with what I'm seeing on my mac. I'll double check on my Mac and my PC.
Sorry for the delay, Looks consistent on my PC as well. I'm getting some runs of (0,0) but that's consistent with your above comment.