mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-14 23:28:52 -04:00
Lower deadzones, since no gamepad had drifts this large
This commit is contained in:
parent
25741b2873
commit
c6efe3b9d0
@ -32,10 +32,9 @@ public class GamepadJoystick {
|
|||||||
//Some controllers aren't recognized as such by android, so we fallback to a default value of 0.2
|
//Some controllers aren't recognized as such by android, so we fallback to a default value of 0.2
|
||||||
//And some others don't report their MotionRange. This was the case with the xbox one series S controller.
|
//And some others don't report their MotionRange. This was the case with the xbox one series S controller.
|
||||||
|
|
||||||
try { deadzone = Math.max(device.getMotionRange(verticalAxis).getFlat(), device.getMotionRange(horizontalAxis).getFlat()) * 1.9f; }
|
//try { deadzone = Math.max(device.getMotionRange(verticalAxis).getFlat(), device.getMotionRange(horizontalAxis).getFlat()) * 1.9f; }
|
||||||
catch (NullPointerException e){ deadzone = 0.2f; }
|
//catch (NullPointerException e){ deadzone = 0.2f; }
|
||||||
|
deadzone = 0.2f;
|
||||||
if(deadzone < 0.2) deadzone = 0.2f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getAngleRadian(MotionEvent event){
|
public double getAngleRadian(MotionEvent event){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user