[3.1] error with Xinput gamepad axis

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.

2 Likes

May I ask to upload a prebuilt lemur.jar for saving me the hassle of creating (yet another) project? Thanks! :stuck_out_tongue:

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 :frowning:

Also checked the joystick and gamepads pdf that is floating around: deazone is always 0.0 for all axis for all joysticks and gamepads :frowning:

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.

2 Likes

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.

2 Likes

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. :wink:

Ah, maybe I didnā€™t update Lemur to the github masterā€¦ :expressionless:

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!