Toby
05-12-2008 08:11:58
Hello,
I would to know if someone manage to set properly car suspension, tire function.
My tire function is not ok. Car slips to much or not at all. And when I take a curve and if a bounce occur then often car stop is lateral movement instead of slipping.
I use NxOgre bleeding and its wheelset. I create a Motor class that modify engine rpm and wheel rpm according to acceleration and gearbox.
This is my param:
tire function value is not academic but before I tried value like it whitout success:
Before with NxOgre 0.9 I use wheel flag NX_WF_INPUT_LAT_SLIPVELOCITY | NX_WF_INPUT_LNG_SLIPVELOCITY but now it is a weird.
Another method I used is at each frame to modify manually stiffnessfactor(this is the same thing that use wheel flag i compute stiffness according to lat velocity and longitudinal velocity)
Any idea to make my dreams come true?
I would to know if someone manage to set properly car suspension, tire function.
My tire function is not ok. Car slips to much or not at all. And when I take a curve and if a bounce occur then often car stop is lateral movement instead of slipping.
I use NxOgre bleeding and its wheelset. I create a Motor class that modify engine rpm and wheel rpm according to acceleration and gearbox.
This is my param:
//collision box
cubeshape.X=3.0
cubeshape.Y=0.9
cubeshape.Z=6.1
mass=3000
density=0
maxBrakeForce=300
//turbo = acceleration x 2
acceleration=100
massPosition.X=0.0
massPosition.Y=-1.16
massPosition.Z=0.2
// Wheel
LeftFrontWheelPosition.X=1.2
LeftFrontWheelPosition.Y=-0.7
LeftFrontWheelPosition.Z=2.2
LeftBackWheelPosition.X=-1.2
LeftBackWheelPosition.Y=-0.7
LeftBackWheelPosition.Z=-1.8
// diamètre de roue
radius=0.45
// pression de l'amortisseur (dureté)
spring=1000.0
damper=0.2
targetValue=1.0
// débattement de l'amortisseur
suspensionTravel=0.2
//value
//| extremum
//| _
//| / \
//| / \_asymptote
//| _/
//|______________ Slip
//
// Fonction de calcul du grip
// valeur pour le grip longitudinal (vers l'avant ou l'arrière)
lngExtremumSlip=0.0
lngExtremumValue=0.05
lngAsymptoteSlip=5.0
lngAsymptoteValue=0.01
// facteur de grip (jouer la dessus pour le grip)
lngStiffnessFactor=800000
// valeur pour le grip lateral
latExtremumSlip=0.0
latExtremumValue=0.02 //16
latAsymptoteSlip=5.0
latAsymptoteValue=0.001
latStiffnessFactor=800000
// Etagement de la boite de vitesse
// Plus la valeur est élevé, plus la force moteur est démultiplié.
// x1 > x2 > ... > xn
gearBox.0 = 10
gearBox.1 = 4.0 //4.0
gearBox.2 = 3.0 //3.0
gearBox.3 = 2.1 //1.8
gearBox.4 = 1.5 //1.2
gearBox.5 = 1.0
gearBox.6 = 0.8
tire function value is not academic but before I tried value like it whitout success:
// valeur pour le grip lateral
latExtremumSlip=2.0
latExtremumValue=0.02 //16
latAsymptoteSlip=5.0
latAsymptoteValue=0.001
latStiffnessFactor=800000
Before with NxOgre 0.9 I use wheel flag NX_WF_INPUT_LAT_SLIPVELOCITY | NX_WF_INPUT_LNG_SLIPVELOCITY but now it is a weird.
Another method I used is at each frame to modify manually stiffnessfactor(this is the same thing that use wheel flag i compute stiffness according to lat velocity and longitudinal velocity)
mWheelFriction.latTFD.stiffnessFactor = mWheelFriction.latDyn - (mWheelFriction.latDyn*fabs(contactData.lateralImpulse));///(1+100*_time);
mWheelFriction.lngTFD.stiffnessFactor = mWheelFriction.lngDyn - (mWheelFriction.lngDyn*fabs(contactData.longitudalImpulse));///(1+100*_time);
// clamp the values to dynamic stiffness
if( mWheelFriction.latTFD.stiffnessFactor < mWheelFriction.latDynMin )
mWheelFriction.latTFD.stiffnessFactor = mWheelFriction.latDynMin;
if( mWheelFriction.lngTFD.stiffnessFactor < mWheelFriction.lngDynMin )
mWheelFriction.lngTFD.stiffnessFactor = mWheelFriction.lngDynMin;
shape->setLateralTireForceFunction(mWheelFriction.latTFD);
shape->setLongitudalTireForceFunction(mWheelFriction.lngTFD);
Any idea to make my dreams come true?