Seperating front and rear tires on Wheeled Vehicles
by Dean Whitlock · in Torque Game Engine · 08/13/2002 (10:23 am) · 4 replies
I got the idea to seperate the front tires and springs from the rear tires and springs. I now have a buggy with small front tires and large rear tires both front and rear having diffrent settings to achive more realistic handling.
thoughts ?
datablock WheeledVehicleTire(DefaultCarTireRear)
{
shapeFile = "~/data/shapes/car/tire2.dts";
friction = 2.0;
lateralForce = 7000;
lateralDamping = 50;
lateralRelaxation = 1;
longitudinalForce = 7000;
longitudinalDamping = 50;
longitudinalRelaxation = 1;
};
datablock WheeledVehicleTire(DefaultCarTireFront)
{
shapeFile = "~/data/shapes/buggy/wheel.dts";
friction = 2.0;
lateralForce = 8000;
lateralDamping = 200;
lateralRelaxation = 1;
longitudinalForce = 8000;
longitudinalDamping = 2000;
longitudinalRelaxation = 1;
};
datablock WheeledVehicleSpring(DefaultCarSpringFront)
{
length = 0.85; // Suspension travel
force = 3000; // Spring force
damping = 1000; // Spring damping
antiSwayForce = 3; // Lateral anti-sway force
};
datablock WheeledVehicleSpring(DefaultCarSpringRear)
{
length = 0.85; // Suspension travel
force = 3000; // Spring force
damping = 2800; // Spring damping
antiSwayForce = 3; // Lateral anti-sway force
This is how I add the tires to the Vehicle
function WheeledVehicleData::onAdd(%this,%obj)
{
for (%i = 2 ; %i >= 0; %i--) {
%obj.setWheelTire(%i,DefaultCarTireFront);
%obj.setWheelSpring(%i,DefaultCarSpringFront);
}// End Front tire for loop
for (%i = 3 ; %i >= 2; %i--) {
%obj.setWheelTire(%i,DefaultCarTireRear);
%obj.setWheelSpring(%i,DefaultCarSpringRear);
} //end Rear tire For loop
} // End Function
};
thoughts ?
datablock WheeledVehicleTire(DefaultCarTireRear)
{
shapeFile = "~/data/shapes/car/tire2.dts";
friction = 2.0;
lateralForce = 7000;
lateralDamping = 50;
lateralRelaxation = 1;
longitudinalForce = 7000;
longitudinalDamping = 50;
longitudinalRelaxation = 1;
};
datablock WheeledVehicleTire(DefaultCarTireFront)
{
shapeFile = "~/data/shapes/buggy/wheel.dts";
friction = 2.0;
lateralForce = 8000;
lateralDamping = 200;
lateralRelaxation = 1;
longitudinalForce = 8000;
longitudinalDamping = 2000;
longitudinalRelaxation = 1;
};
datablock WheeledVehicleSpring(DefaultCarSpringFront)
{
length = 0.85; // Suspension travel
force = 3000; // Spring force
damping = 1000; // Spring damping
antiSwayForce = 3; // Lateral anti-sway force
};
datablock WheeledVehicleSpring(DefaultCarSpringRear)
{
length = 0.85; // Suspension travel
force = 3000; // Spring force
damping = 2800; // Spring damping
antiSwayForce = 3; // Lateral anti-sway force
This is how I add the tires to the Vehicle
function WheeledVehicleData::onAdd(%this,%obj)
{
for (%i = 2 ; %i >= 0; %i--) {
%obj.setWheelTire(%i,DefaultCarTireFront);
%obj.setWheelSpring(%i,DefaultCarSpringFront);
}// End Front tire for loop
for (%i = 3 ; %i >= 2; %i--) {
%obj.setWheelTire(%i,DefaultCarTireRear);
%obj.setWheelSpring(%i,DefaultCarSpringRear);
} //end Rear tire For loop
} // End Function
};
#2
Dean
08/13/2002 (10:54 am)
Looking in to things a little I think it could be possible to seperate wheels by left front, right front and so on. By doing this you could actually have a way to have a specific tire take damage and effect handling. Anyway just a thought I am gonna look into this tonight. Dean
#3
08/13/2002 (1:16 pm)
This might be a good way to achieve front and rear wheel drive vehicles as well, limiting drive train traction to either or. I've been able to do a basic transmission with updated sounds based on speed, but I lost the data in a hard drive failure.
#4
01/01/2003 (8:36 pm)
Cool, apparently i hade something incorrect becuase i could only get 1 set of tires to mount the car. thanks alot.
Torque Owner Mike Stoddart
Thanks