TGEA Gamepad support
by Adam Lindsay · in Torque Game Engine Advanced · 04/13/2007 (9:10 pm) · 2 replies
Forgive me: I know this topic is all over the forums and tdn but, I can't seem to find a way to do this that works. I am attempting to use the following as my base:
http://tdn.garagegames.com/wiki/GettingTorqueConsoleReady
I am not sure if this should work since it refers to TGE 1.4 but, it is the closest (and most recent) thing I can find. I have followed the instructions:
1. According to the console, DirectInput Activates
2. $pref::Input::GamepadEnabled = "1"; is in the pref.cs file
3. GlobalActionMap.bindCmd( gamepad, btn_a, "echo(make);", "echo(break);" ); in default.bind.cs (also tried "actionMap.bind(gamepad, "btn_a", jump);" in the config.cs file.
I don't see any errors and the "a" button does not echo to the console. If I do the above for Joystick, I notice that the gamepad is recognized as a joystick and "button0" does perform the echo (sub button0 for btn_a above). I also notice in the console that for each input device I get "..... input device acquired." However, I do not see this line for the gamepad when it is enabled in the pref.cs file.
If it matters, I am using the Xbox 360 USB controller.
Any insight into what I am doing wrong?
- Adam
http://tdn.garagegames.com/wiki/GettingTorqueConsoleReady
I am not sure if this should work since it refers to TGE 1.4 but, it is the closest (and most recent) thing I can find. I have followed the instructions:
1. According to the console, DirectInput Activates
2. $pref::Input::GamepadEnabled = "1"; is in the pref.cs file
3. GlobalActionMap.bindCmd( gamepad, btn_a, "echo(make);", "echo(break);" ); in default.bind.cs (also tried "actionMap.bind(gamepad, "btn_a", jump);" in the config.cs file.
I don't see any errors and the "a" button does not echo to the console. If I do the above for Joystick, I notice that the gamepad is recognized as a joystick and "button0" does perform the echo (sub button0 for btn_a above). I also notice in the console that for each input device I get "..... input device acquired." However, I do not see this line for the gamepad when it is enabled in the pref.cs file.
If it matters, I am using the Xbox 360 USB controller.
Any insight into what I am doing wrong?
- Adam
About the author
#2
04/18/2007 (8:33 am)
I ended up ditching the gamepad syntax and using the joystick. The only problem I am having is the d-pad. I can't seem to get the upov / dpov / lpov / rpov triggers working. Every other button on the Xbox 360 controller is working flawlessly using the joystick mappings.
Torque 3D Owner Phil Carlisle