Input Handling for joystick controller

I updated jME for the first time in a month or two and found that 3 of my controllers don’t automatically map the way they used to so i did a quick println of the names and ID of each button on a standard 360 remote and was able to quickly fix the issue…The only issue i seem to have on remotes with 4 bumper buttons is the recognized Z axis not being mapped, typically L2,R2 or Left Bumper, Right Bumper. I looked back at the output that i was originally mapping to and realized that X-Rotation new Logical ID is z instead of xz, this is the same Logical ID as the Z-Axis.

I couldn’t really find any explanations or workaround in the forums but i figured its simple and i’m probably just missing something can anyone assist?

[java]
10
Button 0,2
Button 1,1
Button 2,3
Button 3,0
Button 4,4
Button 5,5
Button 6,8
Button 7,9
Button 8,10
Button 9,11
8
Y Axis,y
X Axis,x
Y Rotation,rz
X Rotation,z
Z Axis,z
Hat Switch,pov
pov_x,pov_x
pov_y,pov_y
[/java]

I think this thread is the one that talks about the changes I made and shows how to create a custom mapping that can potentially be added back into core.

http://hub.jmonkeyengine.org/forum/topic/gamepads-with-jme/

1 Like