Gamepad mapping questions

So I’m trying to add a proper default mapping for an Xbox One S gamepad. Managed to mostly do it but I have some questions.

  1. In the default mappings file any Xbox based controller’s rx and ry axes are rebound to z and rz. In order for it to work, actual “z” has to be rebound to “trigger”, while “rz” can stay rz without any issues. What?
    EDIT: Tested it. The right trigger doesn’t work. So by default in JME right trigger is useless on any Xbox based controller, even the ones that have mappings.

  2. JME doesn’t even register the “Menu” button. Like at all. It’s not present in the instance of Joystick and TestJoystick binds the “Home” (xbox) button to the button that would make sense to be the menu one. “Change View” button works just fine apart from the fact that it has to be rebound if you use default button IDs.

I know we aren’t a console-oriented engine, but still I think that the gamepad support is pretty miserable. Also note that I’m on linux, so that might be the reason fro some of the issues, however Rocket League for example, detects the menu button just fine.

Also an idea: Since all xbox based gamepads have to be remapped in pretty much the same way, what if we put some code in the engine that checks if the gamepad has “xbox” in its name and use the xbox mappings if it has?

Each gamepad is different in its own way, and whilst the xbox and playstation pads have managed to somewhat “standardize” it, they arent all designed the same. Since the engine is open-source, someone has to own the controller to add support. I know @pspeed bought a bunch and mapped them, but ultimately, its up to us as the user to contribute when we get a new one in the mix.

True, but I think it’s more the fact that no one is using the gamepad support, because I wanted to just do a quick test app and found it quite a mess.

I’ll also add the rz remapping.

I use JME’s gamepad support all the time. It works fine out of the box with all 8 of them that I have here.

Apparently, it only has issues with XBox controllers. In which case, you can just pop open your games control mapping screen and remap them. Oh, wait… :wink:

It was another user… just like you… who did those mappings. Feel free to track down those posts and check with them but you are also welcome to submit a patch if you have a better mapping.

I actually can’t stand the XBox layout so I only have one of that style here (and apparently it’s not mapped like a normal xbox controller). I can’t see spending money on a gamepad that I would never actually use myself ever.

Yeah, no problem. I personally prefer the xbox layout and have already opened pr with mappings for xbone s gamepad and fixes for the right trigger.

…and I merged it already. :slight_smile:

To each their own, I guess. Having to go up for the movement stick makes me want to sit with a pillow under one butt cheek.

…and the latest PS4 controller is just beautifully designed. I even feel like I’m slumming when going back to a PS3 controller now.

Even nintendo opted for the lopsided dog eyes in their latest controller. It never made sense to me.

Let’s clarify things: input is done with DirectInput (the JME style) or XInput. You have to choose which one you want to support. Please note however that Xinput works only on Windows (I think).

xbox controller (and Xinput devices) can be seen as DirectInput devices, but have a few mappings changed and rumble don’t work. But most button and axis sort of work.

If you want to support Windows only and want perfect xbox-style controller support (which have probably the biggest market share) you probably need Xinput.

Otherwise you should provide the mapping for your device.

1 Like

This is where you’re wrong. I haven’t booted my windows partition for
months and only work on linux. Vibration works fine from jme, however, I
have noticed that vibration doesnt work in some games.

At least in lwjgl2 and Windows 7 i couldnt get Rumble to work and pesegato is right that only One of those APIs support Rumble.

The Logitech G720 (?) for example has a DI/XI Switch and Changing Mappings. Some things Change from Axis to Button etc