Game Development Community

L and R triggers

by David Horn · in Torque X 2D · 06/06/2009 (2:48 pm) · 2 replies

How do I access the L and R triggers and their values?
are the values from 0.0 to 1.0 like the analog sticks?

#1
06/06/2009 (3:24 pm)
Hey David,

You would need to use the XGamePadDevice.GamePadObjects.LeftTrigger and XGamePadDevice.GamePadObjects.RightTrigger enumerations and first setup either a BindMove() or BindAction() to either bind the triggers to either a MoveManager or a function pointer (delegate). If you decide to use a MoveManager, you should most likely bind these to the MoveMapTypes.TriggerAnalog enumerations.

For MoveManager:
You can then check the values of the trigger controls in the ProcessTick() method.

For delegate:
The delegate provides a value parameter which specifies the 0-1 float value of the trigger.
#2
06/06/2009 (7:02 pm)
Thank you