Will check out. What do other engines do about it?
I have no idea.
It’s easy enough to fix it. I’m just trying to figure out if the ‘fix today’ is a fix to just Lemur or both Lemur and JME.
Edit: in the mean time you could see if TestJoystick even shows decent values for JoystickAxis.getDeadzone() on your controller.
I just updated Lemur ‘master’ to pay attention to the dead zone that the axis reports. If it turns out this is a sensible value for your joystick then this should fix the issue.
Else, I will also add a setter to JME’s JoystickAxis interface.
May I ask to upload a prebuilt lemur.jar for saving me the hassle of creating (yet another) project? Thanks!
I guess you will have to wait until I release again, sorry.
I’ve tried with TestJoystick: unfortunately, the deadzone reported by the API is 0.0 for all axis
Also checked the joystick and gamepads pdf that is floating around: deazone is always 0.0 for all axis for all joysticks and gamepads
So I guess the latest lemur commit won’t help much on this issue…
Yep, I’ll have to make a mod to JME, also.
Can’t you throw out axe events that don’t have a minimum length, from your listener until it works out of the box?
I made a virtual joystick for android and that dead zone is a parameter of the constructor.
It would be nice if we could add these parameters to the joystick-mapping.properties
I think we might want to have pos / neg dead zone values for each axis somehow?
About the mentioned pdf - yes 0.0 everywhere:
→ Joysticks-and-Gamepads.pdf - Google Drive
I will add a setter to the axis so that the player can configure it through the in-game controller menu…
It can’t really be standardized on joystick type because they wear over time and may have different quality construction.
Just a note: I’ve modified JME head to have a setter for the axis dead zone. InputManager will now also pay attention to this setting. Lemur has already been modified to use it but I haven’t cut a release yet.
So, how do I change the deadzone? Thanks!
…with the setDeadZone() method…
…which belongs to the class…
“I wonder how I would set the dead zone on the axis…”
perhaps by calling setDeadZone on the joystick Axis object…
Maybe. could be crazy to try it.
Ah, maybe I didn’t update Lemur to the github master…
The setDeadZone() method was added to JME
Isn’t it the com.simsilica.lemur.input.Axis ?
No… that’s basically just an ID. It’s still JME that’s doing all of the joystick processing and InputMapper is just delegating to it.
…so I have a Lemur Axis, and a InputMapper. How do I get the corresponding JME Axis, so that I can call setDeadZone() on it? Thanks!