XBOX 360 Controller
by Warren Post · in Torque Game Builder · 02/10/2008 (7:39 pm) · 5 replies
I have a question regarding the XBOX 360 controller. According to the Torque Developer Network the key bind for the Right Trigger and Left Trigger is "zaxis."
Since, I want to create a game that uses both triggers, but for separate functions (i.e. LT to throw grenade and RT to shoot gun) how would I do this?
Any suggestions would be very helpful, thanks!
Since, I want to create a game that uses both triggers, but for separate functions (i.e. LT to throw grenade and RT to shoot gun) how would I do this?
Any suggestions would be very helpful, thanks!
#2
If you want to use separate left and right triggers, you need to be using the xinput0..4 interface. Which then allows you to bind as "triggerl" and "triggerr". That's assuming your version of TGB supports XInput, I'm not sure if it's in by default or you need to add a resource as you do with TGE.
Incidentally, using xinput will then also give you access to controller rumble which isn't available when using it as a joystick via direct input.
02/13/2008 (4:00 am)
The two analogue "triggers" are bound to zaxis when you're using the controller as a joystick, in which case the left would be negative values and the right positive. If you want to use separate left and right triggers, you need to be using the xinput0..4 interface. Which then allows you to bind as "triggerl" and "triggerr". That's assuming your version of TGB supports XInput, I'm not sure if it's in by default or you need to add a resource as you do with TGE.
Incidentally, using xinput will then also give you access to controller rumble which isn't available when using it as a joystick via direct input.
#3
Do you know how to use the joystick with a menu screen gui? I can't find any information on it.
02/14/2008 (7:03 am)
Gary,Do you know how to use the joystick with a menu screen gui? I can't find any information on it.
#4
Of course you still have to decide how you will move from one menu item to the next, but that's really dependent on how you've built your menus.
02/14/2008 (1:35 pm)
The simplest method is probably to create a new action map "MenuMap" and push it whenever you're in a menu you wish to navigate. Then just bind as normal. Of course you still have to decide how you will move from one menu item to the next, but that's really dependent on how you've built your menus.
#5
Ideally I'd like the joystick to control the mouse pointer but I can't for the life of me find out how. Perhaps I need to adjust the mouse settings for use with a controller? Thats over my head.
02/15/2008 (2:01 pm)
I actually have a main menu with 4 buttons. start, quit, instructions and a credit screen. I want to be able to either use the xbox controller to control the mouse pointer, or be able to select each button with the down/up buttons.Ideally I'd like the joystick to control the mouse pointer but I can't for the life of me find out how. Perhaps I need to adjust the mouse settings for use with a controller? Thats over my head.
Torque Owner Corey Magin