mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 08:15:44 +00:00
Merge pull request #688 from rextimmy/vehicle_gamepad_fix
Vehicle gamepad fix for full template.
This commit is contained in:
commit
aa6571330b
2 changed files with 11 additions and 0 deletions
|
|
@ -145,6 +145,9 @@ function clientCmdtoggleVehicleMap(%toggle)
|
||||||
if(%toggle)
|
if(%toggle)
|
||||||
{
|
{
|
||||||
moveMap.pop();
|
moveMap.pop();
|
||||||
|
// clear movement
|
||||||
|
$mvForwardAction = 0;
|
||||||
|
$mvBackwardAction = 0;
|
||||||
vehicleMap.push();
|
vehicleMap.push();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -734,3 +734,11 @@ vehicleMap.bindCmd(keyboard, "escape", "", "handleEscape();");
|
||||||
vehicleMap.bind( keyboard, v, toggleFreeLook ); // v for vanity
|
vehicleMap.bind( keyboard, v, toggleFreeLook ); // v for vanity
|
||||||
//vehicleMap.bind(keyboard, tab, toggleFirstPerson );
|
//vehicleMap.bind(keyboard, tab, toggleFirstPerson );
|
||||||
vehicleMap.bind(keyboard, "alt c", toggleCamera);
|
vehicleMap.bind(keyboard, "alt c", toggleCamera);
|
||||||
|
// bind the left thumbstick for steering
|
||||||
|
vehicleMap.bind( gamepad, thumblx, "D", "-0.23 0.23", gamepadYaw );
|
||||||
|
// bind the gas, break, and reverse buttons
|
||||||
|
vehicleMap.bind( gamepad, btn_a, moveforward );
|
||||||
|
vehicleMap.bind( gamepad, btn_b, brake );
|
||||||
|
vehicleMap.bind( gamepad, btn_x, movebackward );
|
||||||
|
// bind exiting the vehicle to a button
|
||||||
|
vehicleMap.bindCmd(gamepad, btn_y,"getout();","");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue