Download

Gamepad Inputs not mapped correctly to Android Package 4.13

I packaged my Project using ndk-21 ATSC and my Virtual Joystick works but my Gamepad Inputs are not working on my Bluetooth Controllers. I tried to even package the Unreal Third Person Project with the same settings. The Virtual Joystick works but the Bluetooth Gamepad does not map correctly. The camera is controlled by the Left and Right Triggers and the D-Pad does not work. It does this in My Custom Project and also the Unreal Third Person Demo Project. What do I need to do to make my Project Bluetooth Gamepad compatible? I am using a Bluetooth Xbox One Controller and a Mad Catz C.T.R.L. controller to test. I got it to work without doing anything on 4.11 but I don’t understand what I am doing wrong. Any help would be appreciated.

There haven’t been any changes which would explain it working in 4.11 but not in 4.13.

I have a Mad Catz C.T.R.L. as well. Are you making sure to adjust the input switch on the bottom of that controller? It has Mouse, Mobile Bluetooth, and Desktop Game Controller modes. Try switching between those to make sure it’s set to the right input. I’m not sure why the Xbox One controller wouldn’t work right, though.

Also I know with some gamepads, the trigger inputs are read like joystick axis, so they may be read by the engine as the second joystick axis set before right stick. Do they work properly on a Editor/PC build and this is just a localized issue to Android, or have you only tried with an Android build?

Hi,
I’m having the same problem with the same controller (MadCatz CTRL). I assigned every gamepad event in the project settings to the left and right sticks, buttons and the d-pad, and assigned those events to a print node in the controller BP of a new project.
Everything works fine in the editor while I use this bluetooth controller connected to my PC, but when I compile the project and launch it on my smartphone (galaxy S6), only buttons are working, not left or right stick, not d-pad, even when using the switch on the gamepad (buttons are not working “correctly” while in PC mode, the B button is assign to the “back to menu” android function, which is normal but sticks and d-pad are not working at all)

You say you can use the sticks of your MadCatz CTRL (this one? http://www.madcatz.com/gamepads/ctrlr.php ) on android? Can you please tell me what’s the name of the input of the left stick you used in your project settings? “Gamepad Left Thumbstick X-Axis” and “Gamepad Left Thumbstick Y-Axis” ?

I can’t understand how this gamepad can’t work correctly (because it works partialy as the buttons are working) in UE while 100% of other androids game I’ve played with worked without any problem.

Oh I see. I own one but have only used it in a Unity side game project, not Unreal. My current Unreal project is touchscreen controls only, so I haven’t tested the C.T.L.R. with UE4. I can try to check that out some time this week but I just moved to a new home and have unpacking to do, not sure where it is quite yet. I just wanted to make sure you had the correct physical switch setting on the controller before anyone tried to help diagnose the issue.

I don’t have a MadCatz CTRL R here to test, but I’d expect it to just work in GameSmart mode. It looks like it is similar to Nvidia controller (right stick is Z / RZ) and DPAD buttons are on the hat. The generic configuration is Z / RZ but without hat support so the DPAD will not work as-is.

Adding support for the DPAD is fairly easy if you are working from source:

In Engine/Build/Android/Java/src/com/epicgames/GameActivity.java add:


		new DeviceInfoData(0x0738, 0x5263, "Mad Catz C.T.R.L.R (Smart)"),
		new DeviceInfoData(0x0738, 0x5266, "Mad Catz C.T.R.L.R"),


to the start of DeviceInfoList so it can recognize the device by vendor and product ids.

Then, in Engine/Source/Runtime/Core/Private/Android/AndroidInputInterface.cpp add:


					else if (CurrentDevice.DeviceInfo.Name.StartsWith(TEXT("Mad Catz C.T.R.L.R")))
					{
						CurrentDevice.bSupportsHat = true;
					}


after:


					else if (CurrentDevice.DeviceInfo.Name.StartsWith(TEXT("Samsung Game Pad EI-GP20")))
					{
						CurrentDevice.bSupportsHat = true;
						CurrentDevice.bMapL1R1ToTriggers = true;
						CurrentDevice.bRightStickZRZ = false;
						CurrentDevice.bRightStickRXRY = true;
					}


I can see about adding this for 4.15 if it works for you.