Remapping Vehicle controls
by Ronald J Nelson · in Technical Issues · 08/03/2005 (10:18 am) · 4 replies
Can someone tell me how I can remap the controls for a wheeled vehicle for the left/right turn keyboard to making it turn by yaw input? I would like to make this something that is by default? Or even better yet if there is some way to make it so there are more than one possible control methods for something like this?
I would like to make it optional if you want the keyboard to steer your vehicle or that you would wnt something like a joystick to do it.
I would like to make it optional if you want the keyboard to steer your vehicle or that you would wnt something like a joystick to do it.
#2
08/04/2005 (9:45 am)
If I were you I would delete the thread... or post my answer in case someone came acrossed it in the future :)
#3
08/12/2005 (8:47 am)
Well My code was a bit different from those I have seen poseted but I found with this one that I actually get the same gradual turn speed as the keyboard.function yaw2(%val)
{
if ($pref::Input::Deadzone1 < %val)
{
$mvYawLeftSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}
else
{
$mvYawLeftSpeed = 0;
}
if ($pref::Input::Deadzone2 > %val)
{
$mvYawRightSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}
else
{
$mvYawRightSpeed = 0;
}
}
function pitch2(%val)
{
if ($pref::Input::Deadzone1 < %val)
{
$mvPitchDownSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}
else
{
$mvPitchDownSpeed = 0;
}
if ($pref::Input::Deadzone2 > %val)
{
$mvPitchUpSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}
else
{
$mvPitchUpSpeed = 0;
}
}
function roll2(%val)
{
if ($pref::Input::Deadzone1 < %val)
{
$mvRollLeftSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}
else
{
$mvRollLeftSpeed = 0;
}
if ($pref::Input::Deadzone2 > %val)
{
$mvRollRightSpeed = %val ? $Pref::Input::KeyboardTurnSpeed : 0;
}
else
{
$mvRollRightSpeed = 0;
}
}
$pref::Input::Deadzone1 = 0.25;
$pref::Input::Deadzone2 = -0.25;
#4
www.garagegames.com/mg/forums/result.thread.php?qt=33255
Any help would be appreciated.
08/12/2005 (8:50 am)
My next problem is trying to allow remapping the controls from the control menu as you can see in the following link.www.garagegames.com/mg/forums/result.thread.php?qt=33255
Any help would be appreciated.
Torque Owner Ronald J Nelson
Code Hammer Games