Game Development Community

Car slipping / turning at 65 mph and above

by Chris Newman · in Torque Game Engine · 11/07/2004 (8:27 am) · 45 replies

When the speedo hit 65 my car starts to slip to the left or right. It refuses to stay in a straght line above these speeds.

I have completely flat terrain and the only data block setting i changed to cause this was the maxWheelSpeed. I changed that to 70.

I tried tweaking other settings but nothing seems to help it at all.

Ive noticed other racing games have cars at high speeds and from the videos they did not have this problem.
Page«First 1 2 3 Next»
#41
10/30/2007 (4:57 am)
In server/scripts/car.cs, Look for:

function WheeledVehicleData::onAdd(%this,%obj)
{
   // Setup the car with some defaults tires & springs
   for (%i = %obj.getWheelCount() - 1; %i >= 0; %i--) {
      %obj.setWheelTire(%i,DefaultCarTire);
      %obj.setWheelSpring(%i,DefaultCarSpring);
      %obj.setWheelPowered(%i,false);
   }

Just below that is the following:
// Steer front tires
   %obj.setWheelSteering(0,1);
   %obj.setWheelSteering(1,1);

   // Only power the two rear wheels...
   //%obj.setWheelPowered(2,true);
  // %obj.setWheelPowered(3,true);
Of course, the setWheelPowered won't be commented out in your version. Just replace the commented part with:
//Let's have front wheel drive with this car.
  %obj.setWheelPowered(0,true);
  %obj.setWheelPowered(1,true);
}
And there you will have front wheel drive. :-)
#42
10/30/2007 (11:55 am)
Mike,

Thanks for the detailed explanation. Only one problem, and I should've seen this coming: I'm using the BraveTree car pack, and it's got different code for the wheels and steering. None of the above is in the car.cs file I have. No biggie, I have my car almost working the way I want... I could try to experiment, but I've messed with this script so much (without actually knowing how to script, which can be a little hairy), that I'm not eager to mess some more :). Thanks again, though.
#43
11/05/2007 (12:29 pm)
This code can be usefull for increase speed limit without slipping?:

Wheeled Vehicle Down Force:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5840
#44
12/07/2007 (7:51 am)
Hi... I would like to center the wheels as i release the keyboar... anyone can help?
#45
12/07/2007 (8:00 am)
Nuno - Look at Tim Heldna's post above for a code change to WheeledVehicle::updateMove change your code to that and it will.
Page«First 1 2 3 Next»