Godot version:
3.2.2
OS/device including version:
Windows 10 1909
Issue description:
The input mapping is not working very well in this new version of godot (3.2.2). Previously (3.2.1) my generic gamepad was working very good, if i press left, the character move the left, if I press Cross, the character jump etc. But with the same input mapping, in godot 3.2.2 the actions are mixed, example: if I press Triangle, godot take this as i was pressed Dpad-Up, if I press Circle, the engine activate Dpad-down
Steps to reproduce:
Plug a generic gamepad (PS2 style) with an adapter PS2-USB
Minimal reproduction project:
Could you retrieve current mappings for this gamepad using one of the tools listed at https://github.com/gabomdq/SDL_GameControllerDB#mapping-tools?
Then you can test it by using this in your scene:
Input.add_joy_mapping("the mapping string you got", true)
Could you also get the device GUID with Input.get_joy_guid(0)?
Thank you very much! the Input.add_joy_mapping("the mapping string you got", true) method works fine
Well I actually want to know what that mapping is, and it should be added to https://github.com/gabomdq/SDL_GameControllerDB so that other SDL and Godot users can benefit from it.
well, this is the mapping:
"030000004c0500006802000000000000,PS3 Controller CUstom,platform:Windows,a:b14,b:b13,x:b15,y:b12,back:b1,start:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpdown:b6,dpleft:b7,dpright:b5,leftx:+a0,lefttrigger:b8,righttrigger:b9,"
Thanks! What tool did you use to generate the mapping?
It's surprisingly different from SDL_GameControllerDB's current mapping for this device:
diff --git a/gamecontrollerdb.txt b/gamecontrollerdb.txt
index f597a00..0539f5e 100644
--- a/gamecontrollerdb.txt
+++ b/gamecontrollerdb.txt
@@ -213,7 +213,7 @@
030000006b1400000303000000000000,PS2 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
030000009d0d00001330000000000000,PS2 Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
03000000250900000500000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b0,y:b3,platform:Windows,
-030000004c0500006802000000000000,PS3 Controller,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b10,lefttrigger:a3~,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:a4~,rightx:a2,righty:a5,start:b8,x:b3,y:b0,platform:Windows,
+030000004c0500006802000000000000,PS3 Controller,a:b14,b:b13,back:b1,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,leftshoulder:b10,lefttrigger:b8,leftx:+a0,rightshoulder:b11,righttrigger:b9,start:b2,x:b15,y:b12,platform:Windows,
03000000632500007505000000000000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000888800000803000000000000,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b9,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows,
030000008f0e00001431000000000000,PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
@madmiraal Is this because we'd need #38151 to support the current mapping in SDL_GameControllerDB?
Yes. We've dropped the old controllers mappings in 9b636a2cc, without adding support for the new mappings.
BTW A non-compat breaking 3.2 version of #38151 is #38724, but it needs testing.
I'll test #38724 and merge for 3.2.3 then, I think it's important that we support the new mappings in 3.2. Re-adding the old mappings would work for a handful of devices but there are many more added to the new file which we don't support properly for now.
@dannygaray60 Can you test if the Windows build from @madmiraal's PR works out of the box with your controller (without using the custom mapping)? https://ci.appveyor.com/project/akien-mga/godot/builds/33749779/artifacts
nope, it doesnt work, now the L2 button reacts as L1 button, but, one thing I forgot mention it, the L3 i'm using for select button, and R3 as start, because the originals buttons are damaged, but the other buttons are correctly mapped with gamepad-tool
@dannygaray60 I'm confused. Are you using your own mapping or the mapping included with the custom build? If you use the custom build to run the Joypads Demo, do the buttons (that work on your controller) light up as expected, or are you saying the L1 button lights up when you press the L2 trigger?
I tested one more time the custom build with the joypad demo and this is the result:
L2 activate: start (on joypad demo)
R2 activate: select (joypad demo..)
L1 -> L3 (the same)
L2 -> R3 (etc)
The cross, square, triangle, circle doesnt work
dpad-up, left, right doesnt work too
dpad-down activate L1
the left stick works fine,
and the right stick only work to left-right directions, (down direction activate L2)
L3 activate: Circle
R3 activate: Cross
and the start and select button I cant press because are damaged
and in the joypad demo, this recognize my controller as PS3 controller, but my generic controller is for the play2. is a dualshock2 clone
@dannygaray60 As indicated here and clarified here, Windows users need to install drivers to get PS3 controllers to work with the new mappings. I've not been able to locate official drivers, but this article seems to be a reasonable starting point. Please let us know what if anything works for you.
I wont install new drivers, my dualshock is working very well in another games (made in another engines), this issue only happens with godot 3.2.2. On anterior versions de controller was working fine
Most helpful comment
I wont install new drivers, my dualshock is working very well in another games (made in another engines), this issue only happens with godot 3.2.2. On anterior versions de controller was working fine