From 46794e251d240252ebddc75a88215b942f6a9804 Mon Sep 17 00:00:00 2001 From: Paul Speed Date: Sat, 5 Dec 2015 06:27:17 -0500 Subject: [PATCH] Allow the caller to override the axis' default dead zone configured at startup. --- .../src/main/java/com/jme3/input/DefaultJoystickAxis.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/jme3-core/src/main/java/com/jme3/input/DefaultJoystickAxis.java b/jme3-core/src/main/java/com/jme3/input/DefaultJoystickAxis.java index 8f32c2d6b..7d7901911 100644 --- a/jme3-core/src/main/java/com/jme3/input/DefaultJoystickAxis.java +++ b/jme3-core/src/main/java/com/jme3/input/DefaultJoystickAxis.java @@ -135,6 +135,14 @@ public class DefaultJoystickAxis implements JoystickAxis { return deadZone; } + /** + * Sets/overrides the dead zone for this axis. This indicates that values + * within +/- deadZone should be ignored. + */ + public void setDeadZone( float f ) { + this.deadZone = f; + } + @Override public String toString(){ return "JoystickAxis[name=" + name + ", parent=" + parent.getName() + ", id=" + axisIndex