Gamepad joysticks snap cardinals points in Simulator

Hello,

When I turn my gamepad’s joystick, left, right, up and down values are snapped. Why?

Because of that there are some missing values : around each cardinal point, we lost something like between 15 and 20 degrees.

I’m on windows.

Enregistrement-2025-09-12-210751

There is no snapping specifically, it is just translating what is coming back from the joystick. You could try turning down the dead zone and seeing if that helps with accuracy.

If I remove the dead zone, the snapping disappears. But now the joystick is more sensitive. Are you sure that there is no miscalculation here? I don’t understand why adding a dead zone adds snapping.

That’s pretty much the definition of how dead zones work… They snap your joystick to 0 when it’s within a certain range so that you don’t accidentally do stuff and to combat stick drift.

I don’t think it works that way or you didn’t understand the problem. If I push the joystick to the maximum, I got wrong calculation near cardinal points. The dead zone shouldn’t matter here because I push the joystick to the maximum (so far away from the dead zone).

There is no real math happening here on our end. It is using the value coming from the SDL joystick API directly. What controller are you using? You could try updating the joystick map file that is installed in the SDK/bin folder (the GitHub URL is inside the file) and see if that helps at all.

Some APIs implement the dead zone incorrectly and instead of using a circle in the middle of the joystick, instead snap to each axis individually, I was referring to that (as a SDL2 dev I can say I have done this before…)

That’s weird, usually the SDL2 app needs to handle dead zones themselves? Maybe something to do with an external app messing with dead zones.

We do implement dead zones ourselves but in this case it shouldn't be hit if the controller is correctly sending back a high enough value for the direction magnitude since it only works on the middle area of the stick.