Game Development Community

Can't get vehicle to hold still

by Ronald J Nelson · in Torque Game Engine · 07/18/2007 (12:17 am) · 2 replies

Well its a pretty small problem but one I am sure someone can tell me how I am goofing it up. I am having a problem with vehicles slowly sliding without any input. I must admit my datablocks have been modified to allow for much higher speeds than the 65 MPH that makes the dune buggy go crazy.

datablock WheeledVehicleSpring(elimSpring1)
{
   // Wheel suspension properties
   length = 0.3;             // Suspension travel
   force = 2800;              // Spring force
   damping = 1600;             // Spring damping
   antiSwayForce = 3;         // Lateral anti-sway force
};

//Available Wheels
//-----------------------------------------------------------------------------
datablock WheeledVehicleTire(EliminatorFWheel1)
{
   // Tires act as springs and generate lateral and longitudinal
   // forces to move the vehicle. These distortion/spring forces
   // are what convert wheel angular velocity into forces that
   // act on the rigid body.
   shapeFile = "~/data/shapes/vehicles/eliminator/wheelset1/wheel.dts";
   staticFriction = 5;
   kineticFriction = 4;
   rollingResistance = 0.5;

   // Spring that generates lateral tire forces
   lateralForce = 80000;
   lateralDamping = 1600;
   lateralRelaxation = 1;

   // Spring that generates longitudinal tire forces
   longitudinalForce = 90000;
   longitudinalDamping = 80000;
   longitudinalRelaxation = 1;
};

The from the car itself:

//--------------------------------------
   // Rigid Body
   //--------------------------------------
   mass = 400;
   massCenter = "0 0 0";    // Center of mass for rigid body
   massBox = "0 -0.2 0";         // Size of box used for moment of inertia,
                              // if zero it defaults to object bounding box
   drag = 0.6;                // Drag coefficient
   bodyFriction = 0.6;
   bodyRestitution = 0.4;
   integration = 8;           // Physics integration: TickSec/Rate
   collisionTol = 0.1;        // Collision distance tolerance
   contactTol = 0.1;          // Contact velocity tolerance
   areaImpulse = 12; 

   maxSteeringAngle = 0.785;  // Maximum steering angle, should match animation

   //--------------------------------------
   // Engine
   //--------------------------------------
   engineTorque = 3300;       // Engine power
   engineBrake = 600;         // Braking when throttle is 0
   brakeTorque = 8000;        // When brakes are applied
   maxWheelSpeed = 130;        // Engine scale by current speed / max speed

The slip is pretty slow but in cases where I want to have a vehicle setting somewhere, the sliding thing is a problem. I am still getting the feel of the whole springs and wheel settings so be gentle.

#1
07/18/2007 (1:35 am)
Hi, i am no expert, but have you tried to increase the static friction val?

Neil
#2
07/18/2007 (5:48 am)
Yes. I even tried all the way up to 20 with no improvement.