Fixing the Vehicle class in UE4 starting with NWheel implementation.

Oh yeah BoredEngineer, the PxVehicleSuspensionData formulas are in the PxVehicleComponent.h.

Haha, well that did nothing. I’ve been trying to piece together how the raycast information is being handled, so I wrote some code in the Vehicle Manager to log out the hit result for all the wheels, I’m compiling now to see what that turns up. I understand what causes the pop, but finding it in the code is another matter.

I modified and cleaned some code (especially differential setup, in matter of fact all wheels were decoupled from drivetrain) and custom NW class working now - bit oversteer, but its matter of parameters. And heres some leaning:


3af6b6e8897787a247cd42815605f2811ad1bbd8.jpeg

Thanks for help, your suggestions were very helpful in fixing this, I owe you one :slight_smile:
BTW as I remember, sprung masses are computed by PxVehicleComputeSprungMasses - theres kind of array in output (hope its not heresy, I`m not quite familiar with PhysXAPI).

Hey guys,

first of all I’m glad to so many people working on this :slight_smile: But the problem is everyone is working on their own version… Wouldn’t it be better if you cooperate on this?

Also, are there GitHub repositories for any of of your work?

Actually there is one repo: N Wheeled Vehicles - Showcase - Epic Developer Community Forums
My custom class is based on it.

Hey guys! Edson here :slight_smile: ! First of all, thank you all for interest and support on this…

> Making it not an Engine Class WAS my intention, but i could not understand how to do that on those days, and now, thanks to you, I see what was my mistakes!

> It really would be very helpful if we work together on the same project, using GitHub to get connected! It’s better working this way.

@ > My repo link was pointing to an outdated tree, sorry guys… Have updated my own thread to point to the right tree, which is RELEASE instead! :o
Anyway the link is here now

I absolutely agree with you guys, that’s why I made a thread encouraging everyone to work together. Though the NWheel class is just the beginning, the over all goal is to fix the vehicle problems. I’m finally able to get at the information contained in the vehicle manager class, so I should be able to make some sort of progress today. I’m trying to fix the hardcore reactions that happen when 2 wheels touch.

Okay…

I dont know what PhysX is, but I am actually willing to help. Count me in, but… I am not a very experienced programmer, so forget it. My bad, good idea though!


I don't have any code, duh!

Ok, so I’m currently trying to find the release notes for PhysX 3.3.4, and see how far the implementation has goes? The source for 3.3.4 went up 2 months ago, but I’m not sure if the engine has been updated accordingly. Also, based on Nvidia’s track record, we should be nearing a 3.4 release, which might herald great things for us. Anyways, I’m still here, and still pursuing this.

Ok, so I found the release notes, they did nothing with the vehicles, and it’s not in UE4 yet. Also it was a relatively small update, I’m assuming it wasn’t very important, as the only way to find the release notes is through the source on github. So hopefully that means that 3.4 is right around the corner.

i wouldnt pin your hopes on the next physx update fixing the vehicles.
either try and fix it yourself,
(somewhere in horrible car physics thread the offending parts of physx sdk are noted). btw someone already tried to cap the spring force and it did nothing. i would suggest looking at force conversions between physx and eu4, there is some evidence of miscalculations somewhere between x2 and x10.
or the bug could be somewhere else completely, if i knew where i would have fixed it a long time ago.
then there is the ‘sticky friction’ bug, where sometimes a stationary car seems glued to the floor.
the physx car also has that strange somehow constricted behaviour when you crash the car. then there is the erratic car on car behaviour, and ect ect…

or you could ditch the physx car altogether and make your own, BoredEngineer has a very good blueprint implementation of that, and i am working on a more advanced code plugin that will be out at some point.

whatever you decide, good luck its not an easy thing to deal with.

I’m not waiting on them, but 3.4 is using a different wheel setup that’ll eliminate most of these issues we’re having.

I found quite a few problematic issues that I think could offer a solution, but I’m currently having a lot of issues getting the PhysX debug to link with UE4. I’ve read every bit of info about various solutions, but I’ve been running into one error after another. So once I guess this fixed I should be able to make some good progress over the next few days.

Its good to see someone looking into this. I’ve gone through the other threads and downloads and even though everyone has done some great work. I can’t find what I am looking for as I am not a coder but I can read it and understand it, but doing it is another matter.

First of all, my family has been building racecars for over 30 years. we specialize in dirt speedway.

I wasn’t happy with the car physics in UE4, looking at the code it seems that the springs only apply force in 1 direction (down to the ground) but coil springs and even torsion springs (swaybar) work in 2 directions, constantly trying to return to equilibrium. So there is a at rest state, max compression and max extension or a torsion spring is at rest state, negative max rotation and positive max rotation.

Also shock absorber, I noticed that the engine only uses damping in the up direction. but in reality a shock absorber works in 2 directions as you know compression and rebound. but some may not know that shocks also work at low speed and high speed (speed of velocity) the lower the velocity the lower the damping and the higher the velocity the higher the damping. But also shock absorbers can also produce a force, so if the compression force (damping a up velocity) is higher then the rebound force (damping a down velocity) it will push the car up (like you see with monster trucks) but the same is also the other way too. This is used in motor racing to help with car handling. lets say you have a nascar and because you are always turning left the weight of the car always moves to the right, you could either put a shock on the right side with a higher compression force to help it from transferring weight to the right too fast, or you could put a higher rebound force on the left to hold the car to the left to slow the weight transferring too fast. But that is only one benefit of a shock other then damping, I won’t get into pre-loading the spring.

In my opinion if your able to get the suspension to have a rebound and compression settings that would fix a lot of problems that I am seeing with it. I did notice that in Jacky’s threat, he had to set his damper to a negative number to get any reasonable handling.

Funnily enough just made a post about this :smiley:
https://forums.unrealengine.com/showthread.php?83483-ASSETS-OPEN-SOURCE-Tanks-tracks-and-N-wheeled-vehicles&p=442419&viewfull=1#post442419

I wouldn’t jump too fast to conclusions, if you check PhysX documentation, there are plenty of settings just for suspension. It’s coded by smart people and I don’t think that they didn’t implemented these features due to the lack of skill or knowledge, most likely they are already there and we simply don’t know what kind of other problems have to be solved and how more complicated suspension would help with it.
One of the main issue with raytraced suspension is that unsprung mass is not simulated, there is no collision body with own inertia and it doesn’t slam into chassis when suspension is fully compressed. I’m working on this feature myself and so far, the only solution is to have a collision body on unsprung mass. But this leads to a **** ton of other problems, like collision issue with landscape and stability of joints. Perhaps they stick to raytraced wheel simply to avoid more problems than using proper collision actually solves.

BoredEngineer, I understand what you are saying. what I can’t figure out is why they scraped the physics in 2.8, from reading through the unity forums there was little bugs with it (wheel colliders) and looking at the 2.8 SDK there was individual files for wheels, suspension and rigid body. Even unity5 is having the same issues with physx 3.3 as we are in UE4. well I guess a racing simulator game with the visuals that UE4 can provide isn’t going to happen :frowning: .

More than likely just because it’s must faster to do a check for a single ray than it is to do a shape/sweep check.

This is a pic from ISI and how they rig a vehicle in the Gmotor to get physics, its all rigidbodies and constraints.

4a9adcfb0e0cd7eeca2fc4227bcdc3e25e4ba892.jpeg

I’m pretty sure most sims setup things like this or with similar concept as it makes it simpler to handle forces: you have to calculate the related forces around the chassis anyway. That being said, I seriously doubt those wheels are actually using rigidbody to rigidbody collisions for ground contact in any of them. Even if generic physics engine had soft body physics support, I wouldn’t count you could use it for tire modeling purposes as it’s a very complicated subject.

If you don’t want/need to model proper tire flex, you’ll still have issues to solve with rigidbody contact and collisions. If you just have a rigidbody against another rigidbody, it can bounce on top of the surface. That’s also the reason it will start acting weird when you get to higher speeds/uneven surfaces and either collision responses overshoot or wheels suddenly loses contact when you’d expect it to be on ground (you wouldn’t want to drive 200km/h with a car equipped with rigid cartwheels in real life either).

I have Rfactor and had made a mod for it. here is the suspension file of the car that comes with Rfactor and is used as a reference when doing a mod.

**//////////////////////////////////////////////////////////////////////////
//
// Conventions:
//
// +x = left
// +z = rear
// +y = up
// +pitch = nose up
// +yaw = nose right
// +roll = right
//
// [BODY] - a rigid mass with mass and inertial properties
// [JOINT] - a ball joint constraining an offset of one body to an
// offset of another body (eliminates 3 DOF)
// [HINGE] - a constraint restricting the relative rotations of two
// bodies to be around a single axis (eliminates 2 DOF).
// [BAR] - a constraint holding an offset of one body from an offset of
// another body at a fixed distance (eliminates 1 DOF).
// [JOINT&HINGE] - both the joint and hinge constraints, forming the
// conventional definition of a hinge (eliminates 5 DOF).
//
//////////////////////////////////////////////////////////////////////////

// Body including all rigidly attached parts (wings, barge boards, etc.)
// NOTE: the mass and inertia for the main vehicle “body” is not used
// because it is derived from the HDV file by subtracting out all the
// wheels, etc. For all other bodies (wheels, spindles), they are important!
[BODY]
name=body mass=(1.0) inertia=(1.0,1.0,1.0)
pos=(0.0,0.0,0.0) ori=(0.0,0.0,0.0)

// Front spindles
[BODY]
name=fl_spindle mass=(8.0) inertia=(0.0275,0.0260,0.0245)
pos=(0.71,0.0,-1.65) ori=(0.0,0.0,0.0)

[BODY]
name=fr_spindle mass=(8.0) inertia=(0.0275,0.0260,0.0245)
pos=(-0.71,0.0,-1.65) ori=(0.0,0.0,0.0)

// Front wheels
[BODY]
name=fl_wheel mass=(20.0) inertia=(0.913,0.594,0.594)
pos=(0.71,0.0,-1.65) ori=(0.0,0.0,0.0)

[BODY]
name=fr_wheel mass=(20.0) inertia=(0.913,0.594,0.594)
pos=(-0.71,0.0,-1.65) ori=(0.0,0.0,0.0)

// Rear spindles
[BODY]
name=rl_spindle mass=(8.5) inertia=(0.0275,0.0260,0.0245)
pos=(0.70,0.0,1.35) ori=(0.0,0.0,0.0)

[BODY]
name=rr_spindle mass=(8.5) inertia=(0.0275,0.0260,0.0245)
pos=(-0.70,0.0,1.35) ori=(0.0,0.0,0.0)

// Rear wheels (includes half of rear-axle)
[BODY]
name=rl_wheel mass=(22.0) inertia=(0.996,0.655,0.655)
pos=(0.70,0.0,1.35) ori=(0.0,0.0,0.0)

[BODY]
name=rr_wheel mass=(22.0) inertia=(0.996,0.655,0.655)
pos=(-0.70,0.0,1.35) ori=(0.0,0.0,0.0)

// Fuel in tank is not rigidly attached - it is attached with springs and
// dampers to simulate movement. Properties are defined in the HDV file.
[BODY]
name=fuel_tank mass=(1.0) inertia=(1.0,1.0,1.0)
pos=(0.0,0.0,0.0) ori=(0.0,0.0,0.0)

// Driver’s head is not rigidly attached, and it does NOT affect the vehicle
// physics. Position is from the eyepoint defined in the VEH file, while
// other properties are defined in the head physics file.
[BODY]
name=driver_head mass=(5.0) inertia=(0.02,0.02,0.02)
pos=(0.0,0.0,0.0) ori=(0.0,0.0,0.0)

//////////////////////////////////////////////////////////////////////////
//
// Constraints
//
//////////////////////////////////////////////////////////////////////////

// Front wheel and spindle connections
[JOINT&HINGE]
posbody=fl_wheel negbody=fl_spindle pos=fl_wheel axis=(-0.71,0.0,0.0)

[JOINT&HINGE]
posbody=fr_wheel negbody=fr_spindle pos=fr_wheel axis=(0.71,0.0,0.0)

// Front left suspension (2 A-arms + 1 steering arm = 5 links)
[BAR] // forward upper arm
name=fl_fore_upper posbody=body negbody=fl_spindle pos=(0.410,0.195,-1.65) neg=(0.600,0.223,-1.635)

[BAR] // rearward upper arm
posbody=body negbody=fl_spindle pos=(0.410,0.195,-1.45) neg=(0.600,0.223,-1.635)

[BAR] // forward lower arm
posbody=body negbody=fl_spindle pos=(0.282,-0.113,-1.65) neg=(0.625,-0.113,-1.65)

[BAR] // rearward lower arm
name=fl_fore_lower posbody=body negbody=fl_spindle pos=(0.282,-0.113,-1.425) neg=(0.625,-0.113,-1.65)

[BAR] // steering arm (must be named for identification)
name=fl_steering posbody=body negbody=fl_spindle pos=(0.250,-0.100,-1.740) neg=(0.617,-0.110,-1.750)

// Front right suspension (2 A-arms + 1 steering arm = 5 links)
[BAR] // forward upper arm (used in steering lock calculation)
name=fr_fore_upper posbody=body negbody=fr_spindle pos=(-0.410,0.195,-1.65) neg=(-0.600,0.223,-1.635)

[BAR] // rearward upper arm
posbody=body negbody=fr_spindle pos=(-0.410,0.195,-1.45) neg=(-0.600,0.223,-1.635)

[BAR] // forward lower arm
name=fr_fore_lower posbody=body negbody=fr_spindle pos=(-0.282,-0.113,-1.65) neg=(-0.625,-0.113,-1.65)

[BAR] // rearward lower arm
posbody=body negbody=fr_spindle pos=(-0.282,-0.113,-1.425) neg=(-0.625,-0.113,-1.65)

[BAR] // steering arm (must be named for identification)
name=fr_steering posbody=body negbody=fr_spindle pos=(-0.250,-0.100,-1.740) neg=(-0.617,-0.110,-1.750)

// Rear left suspension (2 A-arms + 1 straight link = 5 links)
[BAR] // forward upper arm
posbody=body negbody=rl_spindle pos=(0.450,0.111,1.25) neg=(0.615,0.132,1.35)

[BAR] // rearward upper arm
posbody=body negbody=rl_spindle pos=(0.450,0.111,1.50) neg=(0.615,0.132,1.35)

[BAR] // forward lower arm
posbody=body negbody=rl_spindle pos=(0.280,-0.10,1.25) neg=(0.635,-0.08,1.35)

[BAR] // rearward lower arm
posbody=body negbody=rl_spindle pos=(0.280,-0.10,1.50) neg=(0.635,-0.08,1.35)

[BAR] // straight link
posbody=body negbody=rl_spindle pos=(0.350,-0.020,1.52) neg=(0.635,-0.00,1.52)

// Rear right suspension (2 A-arms + 1 straight link = 5 links)
[BAR] // forward upper arm
posbody=body negbody=rr_spindle pos=(-0.450,0.111,1.25) neg=(-0.615,0.132,1.35)

[BAR] // rearward upper arm
posbody=body negbody=rr_spindle pos=(-0.450,0.111,1.50) neg=(-0.615,0.132,1.35)

[BAR] // forward lower arm
posbody=body negbody=rr_spindle pos=(-0.280,-0.10,1.25) neg=(-0.635,-0.08,1.35)

[BAR] // rearward lower arm
posbody=body negbody=rr_spindle pos=(-0.280,-0.10,1.50) neg=(-0.635,-0.08,1.35)

[BAR] // straight link
posbody=body negbody=rr_spindle pos=(-0.350,-0.020,1.52) neg=(-0.635,-0.00,1.52)

// Rear spindle and wheel connections
[JOINT&HINGE]
posbody=rl_wheel negbody=rl_spindle pos=rl_wheel axis=(-0.70,0.0,0.0)

[JOINT&HINGE]
posbody=rr_wheel negbody=rr_spindle pos=rr_wheel axis=(0.70,0.0,0.0)**

They also do have set tire file.

FRONT: // Arguments: ALL, FRONT, REAR, LEFT, RIGHT, FRONTLEFT, FRONTRIGHT, REARLEFT, REARRIGHT
DryLatLong=(1.335, 1.335) // Lateral/longitudinal coefficients in dry weather
WetLatLong=(1.290, 1.290) // Lateral/longitudinal coefficients in wet weather
Radius=0.315 // Radius of tire
RadiusRPM=2.01e-6 // Increased radius per unit RPM
Width=0.205 // Width of tire
SpringBase=43740.0 // Base spring rate with no pressure
SpringkPa=1396.58 // Spring rate per unit pressure
Damper=1345.0 // Damping rate of tire
SpeedEffects=(350.0, 10.0) // Speed at which grip drops to half (m/s, 0.0 to disable), speed load equivalency (see above)
LoadSens=(-1.31e-5, 0.38, 22000.0) // Load sensitivity of tire (initial slope, final grip multiplier, final load)
LatPeak=(0.077, 0.285, 9500.0) // Slip range where lateral peak force occurs depending on load
LongPeak=(0.077, 0.285, 9500.0) // Slip range where longitudinal peak force occurs depending on load
LatCurve=“Default” // Slip angle curve (data uses normalized angle)
BrakingCurve=“Default” // Slip ratio curve under braking
TractiveCurve=“Default” // Slip ratio curve under acceleration
CamberLatLong=(2.50, 0.09, 0.35) // Peak camber angle, lateral gain at peak, longitudinal loss at 90 degrees
RollingResistance=3050.0 // Resistance torque (Nm) per unit deflection (m) on ground
PneumaticTrail=0.000001 // Pneumatic trail per unit load (m/N), adjusted based on slip
HeatBasePeak=(0.15, 0.02) // Base peak slip to compute friction heat, fraction of base to use (0.0=use dynamic peak slip only)
Heating=(8.50e-1, 8.80e-3) // Heat caused by (rolling, friction)
Transfer=(9.00e-3, 1.80e-3, 2.90e-4) // Heat transfer to (road, static air, moving air)
HeatDistrib=(12.0, 95.0) // (Max camber angle, max off-pressure) that affects heat distribution (higher number -> less temperature difference)
AirTreadRate=0.013 // Heat transfer between tread and inside air
WearRate=0.215e-6 // Wear rate constant
Softness=0.55 // Softness is now just for AI strategic use
AIGripMult=1.040 // Grip multiplier for AI vehicles (due to tire model simplification)
AIPeakSlip=0.092 // Simple peak slip angle for AI vehicles
AIWear=0.701e-7 // AI wear rate constant
Temperatures=(101.0, 20.0) // Optimum operating temperature for peak forces (Celsius), starting temperature
OptimumPressure=(154.0, 0.0170) // Base pressure to remain flat on ground at zero deflection, and multiplier by load to stay flat on ground
GripTempPress=(1.6, 0.9, 0.50) // Grip effects of being below temp, above temp, and off-pressure (higher number -> faster grip dropoff)

And If you are curious on what the HDV file

**//
// This is the high-detail vehicle parameter file.
// It is pointed to by one or more *.veh files.
//
// Any range has the following values: (minimum, step size, number of steps)
// Any setting refers to the step from 0 to <number of steps - 1>.
//
// Everything is in SI units (kg, m, kPa, N, etc.), except:
// Engine speed is measured in RPM.
// Angles are measured in degrees.
//
// +x = left
// +y = up
// +z = rear
//
// Pushrod connections are adjusted from the values found in this file
// based on the graphical location of the wheels. If the graphical location
// does not match the physical location (found in a .pm file), then all
// suspension joints (including the pushrods) are adjusted to match the
// graphical locations. It should be noted that suspension joints are also
// adjusted after setting the camber, caster, and toe-in.
//
// The “reference plane” is equal to the ride height. Note that we have
// added a graphical offset because some stock car series measures the ride heights
// to the frame of the car, but the bodywork hangs about an inch lower (especially
// at the air dam). The graphical offset does not affect the physics in any
// way, just the appearance of how far the vehicle is off the ground. Note
// that the “undertray” points are where the vehicle bottoms out.
//
// Aerodynamic variables:
// Lift is negative downforce
//

[GENERAL]
Rules=0 // what rules to apply to garage setups (0=none, 1=stock car)
GarageDisplayFlags=1 // how settings are displayed in garage (add): 1=rear wing, 2=radiator, 4=more gear info
Mass=1280.0 // all mass except fuel
Inertia=(1630.0, 1930.0, 390.0) // all inertia except fuel
FuelTankPos=(0.00, 0.14, -0.40) // location of tank relative to center of rear axle in reference plane
FuelTankMotion=(560.0,0.7) // simple model of fuel movement in tank (spring rate per kg, critical damping ratio)
Notes=“”
Symmetric=1
DamageFile=damage // .ini file to find physical and graphical damage info
CGHeight=0.2950 // height of body mass (excluding fuel) above reference plane
CGRightRange=(0.500, 0.005, 1) // fraction of weight on left tires
CGRightSetting=0
CGRearRange=(0.460, 0.005, 1) // fraction of weight on rear tires
CGRearSetting=0
WedgeRange=(0.0, 0.25, 1) // rounds of wedge
WedgeSetting=0
WedgePushrod=0.0 // each round of wedge changes rear-left jacking screw by this amount (0.0 to disable, use Rules to allow FR ride height)
GraphicalOffset=(0.0, 0.01, 0.0) // does not affect physics! This just moves the vehicle body for whatever reasons you may have.
FLUndertray=(0.75, 0.0, -0.65) // corner offset from center of front axle in reference plane
FRUndertray=(-0.75, 0.0, -0.65) // corner offset from center of front axle in reference plane
RLUndertray=(0.75, 0.0, 0.00) // corner offset from center of rear axle in reference plane
RRUndertray=(-0.75, 0.0, 0.00) // corner offset from center of rear axle in reference plane
UndertrayParams=(385000.0, 17500.0, 2.0) // spring/damper/friction
TireBrand=ZR_Tires_lvl1 // must appear before tire compound setting (references *.tbc file)
FrontTireCompoundSetting=0 // compound index within brand
RearTireCompoundSetting=0 // compound index within brand
FuelRange=(1.0, 1.0, 60)
FuelSetting=34
NumPitstopsRange=(0, 1, 4)
NumPitstopsSetting=3
Pitstop1Range=(1.0, 1.0, 60)
Pitstop1Setting=34
Pitstop2Range=(1.0, 1.0, 60)
Pitstop2Setting=34
Pitstop3Range=(1.0, 1.0, 60)
Pitstop3Setting=34
AIAimSpeedsPerWP=(26.0, 34.0, 42.0, 55.0, 75.0, 100.0, 100.0, 100.0) // speeds at which to look ahead X waypoints (spaced roughly 5 meters apart)
AICornerReductionBase=80.0
AIMinPassesPerTick=3 // minimum passes per tick (can use more accurate spring/damper/torque values, but takes more CPU)
AIRotationThreshold=0.20 // rotation threshold (rads/sec) to temporarily increment passes per tick
AIEvenSuspension=0.0 // averages out spring and damper rates to improve stability (0.0 - 1.0)
AISpringRate=1.0 // spring rate adjustment for AI physics
AIDamperSlow=0.5 // contribution of average slow damper into simple AI damper
AIDamperFast=0.5 // contribution of average fast damper into simple AI damper
AIDownforceZArm=0.150 // hard-coded center-of-pressure offset from vehicle CG
AIDownforceBias=0.0 // bias between setup and hard-coded value (0.0-1.0)
AITorqueStab=(1.0, 1.0, 0.5) // torque adjustment to keep AI stable
FeelerFlags=0 // how collision feelers are generated (add): 1=box influence 2=reduce wall-jumping 4=allow adjustment hack 8=top directions
FeelerOffset=(0.0, 0.0, 0.0) // offset from cg to use when generating feelers
FeelersAtCGHeight=1 // whether corner and side feelers are automatically adjusted to CG height
FeelerFrontLeft=(0.863,0.384,-1.720) // front-left corner collision feeler
FeelerFrontRight=(-0.863,0.384,-1.720) // front-right corner collision feeler
FeelerRearLeft=(0.815,0.384,1.700) // rear-left corner collision feeler
FeelerRearRight=(-0.815,0.384,1.700) // rear-right corner collision feeler
FeelerFront=(0.064,0.384,-1.900) // front side collision feeler
FeelerRear=(0.064,0.384,1.720) // rear side collision feeler
FeelerRight=(-0.933,0.384,-0.247) // right side collision feeler
FeelerLeft=(0.933,0.384,-0.247) // left side collision feeler
FeelerTopFrontLeft=(-0.478,1.540,-0.298) // top front-left collision feeler
FeelerTopFrontRight=(0.478,1.540,-0.298) // top front-right collision feeler
FeelerTopRearLeft=(-0.652,1.511,1.323) // top rear-left collision feeler
FeelerTopRearRight=(0.652,1.511,1.323) // top rear-right collision feeler
FeelerBottom=(0.064,0.249,-0.247) // bottom feeler

[BODYAERO]
BodyDragBase=(0.3100) // base drag
BodyDragHeightAvg=(0.10) // drag increase with average ride height
BodyDragHeightDiff=(0.30) // drag increase with front/rear ride height difference
BodyMaxHeight=(0.20) // maximum ride height that affects drag/lift
BodyLeft=(-0.7, 0.0, 0.0) // aero forces from moving left
BodyRight=(0.7, 0.0, 0.0) // aero forces from moving right
BodyUp=(0.0, -1.5, 0.0) // aero forces from moving up
BodyDown=(0.0, 1.5, 0.0) // aero forces from moving down
BodyAft=(0.0, 0.10, -1.00) // aero forces from moving rearwards
BodyFore=(0.0, -0.045, 0.200) // aero forces from moving forwards (lift value important, but drag overwritten)
BodyRot=(2.0, 1.5, 1.0) // aero torque from rotating
BodyCenter=(0.0, 0.267, -1.200) // center of body aero forces (offset from center of rear axle at ref plane)
RadiatorRange=(100.0, -5.0, 1) // radiator range (front grille tape)
RadiatorSetting=0 // radiator setting
RadiatorDrag=(0.0) // effect of radiator setting on drag
RadiatorLift=(0.0) // effect of radiator setting on lift
BrakeDuctRange=(0.0, 1.0, 1) // brake duct range
BrakeDuctSetting=0 // brake duct setting
BrakeDuctDrag=(0.0) // effect of brake duct setting on drag
BrakeDuctLift=(0.0) // effect of brake duct setting on lift

[SUSPENSION]
PhysicalModelFile=ZR_susp.pm
CorrectedInnerSuspHeight=0.185 // instead of moving inner susp height relative with ride height, use this offset (set to -1 for original behavior)
ApplySlowToFastDampers=0 // whether to apply slow damper settings to fast damper settings
AdjustSuspRates=0 // adjust suspension rates due to motion ratio
AlignWheels=1 // correct for minor unintentional graphical offsets
CenterWheelsOnBodyX=0 // correct for minor unintentional graphical offsets
FrontWheelTrack=1.500 // if non-zero, forces the front wheels to be specified track width
RearWheelTrack=1.520 // if non-zero, forces the rear wheels to be specified track width
LeftWheelBase=2.334 // if non-zero, forces the left side to use specified wheelbase
RightWheelBase=2.334 // if non-zero, forces the right side to use specified wheelbase
SpringBasedAntiSway=0 // 0=diameter-based, 1=spring-based
AllowNoAntiSway=1 // Whether first setting gets overridden to mean no antisway bar
FrontAntiSwayBase=0.0
FrontAntiSwayRange=(0.020, 0.002, 2)
FrontAntiSwaySetting=1
FrontAntiSwayRate=(1.11e11, 4.0) // (base, power), so rate = base * (diameter in meters ^ power)
RearAntiSwayBase=0.0 // extra anti-sway from tube twisting
RearAntiSwayRange=(0.012, 0.002, 2)
RearAntiSwaySetting=0
RearAntiSwayRate=(1.11e11, 4.0) // (base, power), so rate = base * (diameter in meters ^ power)
FrontToeInRange=(-0.10, 0.05, 1)
FrontToeInSetting=0
RearToeInRange=(0.10, 0.05, 1)
RearToeInSetting=0
LeftCasterRange=(3.0, 0.1, 1) // front-left caster
LeftCasterSetting=0
RightCasterRange=(3.0, 0.1, 1) // front-right caster
RightCasterSetting=0
LeftTrackBarRange=(0.1778, 0.003175, 1) // n/a
LeftTrackBarSetting=0
RightTrackBarRange=(0.1778, 0.003175, 1) // n/a
RightTrackBarSetting=0

[CONTROLS]
SteeringFFBMult=1.1 // vehicle-specific multiplier by steering force feedback
SteerLockRange=(5.0, 1.0, 36)
SteerLockSetting=15
RearBrakeRange=(0.240, 0.01, 1)
RearBrakeSetting=0
BrakePressureRange=(0.75, 0.05, 6) // brake pressure
BrakePressureSetting=5
HandbrakePressRange=(0.00, 0.10, 11) // handbrake pressure
HandbrakePressSetting=5
AutoUpshiftGripThresh=0.63 // auto upshift waits until all driven wheels have this much grip (reasonable range: 0.4-0.9)
AutoDownshiftGripThresh=0.63 // auto downshift waits until all driven wheels have this much grip (reasonable range: 0.4-0.9)
TractionControlGrip=(1.00, 0.20) // average driven wheel grip multiplied by 1st number, then added to 2nd
TractionControlLevel=(0.30, 0.90) // effect of grip on throttle for low TC and high TC
ABS4Wheel=1 // 0 = old-style single brake pulse, 1 = more effective 4-wheel ABS
ABSGrip=(1.00, 0.20) // grip multiplied by 1st number and added to 2nd
ABSLevel=(0.30, 0.90) // effect of grip on brakes for low ABS and high ABS
OnboardBrakeBias=0 // whether brake bias is allowed onboard

[ENGINE]
SpeedLimiter=0 // Whether a pitlane speed limiter is available
Normal=ZR_Engine // unrestricted engine
RestrictorPlate=ZR_Engine // restrictor plate engine

[DRIVELINE]
ClutchInertia=0.01400
ClutchTorque=500.0
ClutchWear=0.0
ClutchFriction=14.5
ClutchEngageRate=0.4 // how quickly clutch is engaged with auto-clutch driving aid
BaulkTorque=1300.0
AllowManualOverride=0 // whether to allow manual shift overrides when using auto shifting
SemiAutomatic=0 // whether throttle and clutch are operated automatically (like an F1 car)
UpshiftDelay=0.160 // delay in selecting higher gear (low for semi-automatic, higher for manual)
UpshiftClutchTime=0.225 // time to ease auto-clutch in AFTER upshift (0.0 for F1 cars)
DownshiftDelay=0.160 // delay in selecting lower gear (low for semi-automatic, higher for manual)
DownshiftClutchTime=0.225 // time to ease auto-clutch in AFTER downshift (used to be SemiAutoClutchTime)
DownshiftBlipThrottle=0.70 // amount of throttle used to blip if controlled by game (instead of player)
WheelDrive=REAR // which wheels are driven: REAR, FOUR (even torque split), or FRONT
GearFile=ZR_gears.ini // Must come before final/reverse/gear settings!
AllowGearingChanges=0 // cannot change stock ratios until one buys a tranny upgrade
AllowFinalDriveChanges=0 // cannot change stock ratio until one buys a diff upgrade
FinalDriveSetting=1 // indexed into GearFile list
ReverseSetting=0
ForwardGears=5
Gear1Setting=2
Gear2Setting=9
Gear3Setting=14
Gear4Setting=18
Gear5Setting=20
DiffPumpTorque=0.0 // at 100% pump diff setting, the torque redirected per wheelspeed difference in radians/sec (roughly 1.2kph)
DiffPumpRange=(0.0,0.00,1) // differential acting on all driven wheels
DiffPumpSetting=0
DiffPowerRange=(0.10,0.0,1) // fraction of power-side input torque transferred through diff
DiffPowerSetting=0 // (not implemented for four-wheel drive)
DiffCoastRange=(0.10,0.0,1) // fraction of coast-side input torque transferred through diff
DiffCoastSetting=0 // (not implemented for four-wheel drive)
DiffPreloadRange=(40.0, 0.0, 1) // preload torque that must be overcome to have wheelspeed difference
DiffPreloadSetting=0 // (not implemented for four-wheel drive)

[FRONTLEFT]
BumpTravel=-0.030 // suspension travel upwards
ReboundTravel=-0.160 // suspension travel downwards
BumpStopSpring=160000.0 // initial spring rate of bumpstop
BumpStopRisingSpring=1.20e7 // rising spring rate of same (multiplied by deflection squared)
BumpStopDamper=2000.0 // initial damping rate of bumpstop
BumpStopRisingDamper=9.00e5 // rising damper rate of same (multiplied by deflection squared)
BumpStage2=0.090 // speed where damper bump moves from slow to fast
ReboundStage2=-0.090 // speed where damper rebound moves from slow to fast
FrictionTorque=7.81 // Newton-meters of friction between spindle and wheel
SpinInertia=1.125 // inertia in pitch direction including any axle but not brake disc
CGOffsetX=0.000 // x-offset from graphical center to physical center (NOT IMPLEMENTED)
PushrodSpindle=(-0.125, -0.100, 0.000) // spring/damper connection to spindle or axle (relative to wheel center)
PushrodBody=(-0.225, 0.300, 0.000) // spring/damper connection to body (relative to wheel center)
CamberRange=(-2.0, 0.5, 1)
CamberSetting=0
PressureRange=(100.0, 1.0, 301)
PressureSetting=70
PackerRange=(0.000, 0.001, 1)
PackerSetting=0
SpringMult=1.00 // take into account suspension motion if spring is not attached to spindle (affects physics but not garage display)
SpringRange=(55000.0, 5000.0, 1)
SpringSetting=0
RideHeightRange=(0.1250, 0.005, 1)
RideHeightSetting=0
DamperMult=1.00 // take into account suspension motion if damper is not attached to spindle (affects physics but not garage display)
SlowBumpRange=(4500.0, 250.0, 1)
SlowBumpSetting=0
FastBumpRange=(3000.0, 250.0, 1)
FastBumpSetting=0
SlowReboundRange=(8000.0, 500.0, 1)
SlowReboundSetting=0
FastReboundRange=(6000.0, 500.0, 1)
FastReboundSetting=0
BrakeDiscRange=(0.025, 0.000, 1) // disc thickness
BrakeDiscSetting=0
BrakePadRange=(0, 1, 5) // pad type (not implemented)
BrakePadSetting=2
BrakeDiscInertia=0.750 // inertia per meter of thickness
BrakeOptimumTemp=250.0 // optimum brake temperature in Celsius (peak brake grip)
BrakeFadeRange=400.0 // temperature outside of optimum that brake grip drops to half (too hot or too cold)
BrakeWearRate=1.20e-013 // meters of wear per second at optimum temperature
BrakeFailure=(1.33e-002,7.21e-004) // average and variation in disc thickness at failure
BrakeTorque=1775.0 // maximum brake torque at zero wear and optimum temp
BrakeHeating=0.00100 // heat added linearly with brake torque times wheel speed (at max disc thickness)
BrakeCooling=(3.60e-002,4.60e-004) // minimum brake cooling rate (base and per unit velocity) (at max disc thickness)
BrakeDuctCooling=1.18e-004 // brake cooling rate per brake duct setting (at max disc thickness)

[FRONTRIGHT]
BumpTravel=-0.030 // suspension travel upwards
ReboundTravel=-0.160 // suspension travel downwards
BumpStopSpring=160000.0 // initial spring rate of bumpstop
BumpStopRisingSpring=1.20e7 // rising spring rate of same (multiplied by deflection squared)
BumpStopDamper=2000.0 // initial damping rate of bumpstop
BumpStopRisingDamper=9.00e5 // rising damper rate of same (multiplied by deflection squared)
BumpStage2=0.090 // speed where damper bump moves from slow to fast
ReboundStage2=-0.090 // speed where damper rebound moves from slow to fast
FrictionTorque=7.81 // Newton-meters of friction between spindle and wheel
SpinInertia=1.125 // inertia in pitch direction including any axle but not brake disc
CGOffsetX=0.000 // x-offset from graphical center to physical center (NOT IMPLEMENTED)
PushrodSpindle=(0.125, -0.100, 0.000) // spring/damper connection to spindle or axle (relative to wheel center)
PushrodBody=(0.225, 0.300, 0.000) // spring/damper connection to body (relative to wheel center)
CamberRange=(-2.0, 0.5, 1)
CamberSetting=0
PressureRange=(100.0, 1.0, 301)
PressureSetting=70
PackerRange=(0.000, 0.001, 1)
PackerSetting=0
SpringMult=1.00 // take into account suspension motion if spring is not attached to spindle (affects physics but not garage display)
SpringRange=(55000.0, 5000.0, 1)
SpringSetting=0
RideHeightRange=(0.1250, 0.005, 1)
RideHeightSetting=0
DamperMult=1.00 // take into account suspension motion if damper is not attached to spindle (affects physics but not garage display)
SlowBumpRange=(4500.0, 250.0, 1)
SlowBumpSetting=0
FastBumpRange=(3000.0, 250.0, 1)
FastBumpSetting=0
SlowReboundRange=(8000.0, 500.0, 1)
SlowReboundSetting=0
FastReboundRange=(6000.0, 500.0, 1)
FastReboundSetting=0
BrakeDiscRange=(0.025, 0.000, 1) // disc thickness
BrakeDiscSetting=0
BrakePadRange=(0, 1, 5) // pad type (not implemented)
BrakePadSetting=2
BrakeDiscInertia=0.750 // inertia per meter of thickness
BrakeOptimumTemp=250.0 // optimum brake temperature in Celsius (peak brake grip)
BrakeFadeRange=400.0 // temperature outside of optimum that brake grip drops to half (too hot or too cold)
BrakeWearRate=1.20e-013 // meters of wear per second at optimum temperature
BrakeFailure=(1.33e-002,7.21e-004) // average and variation in disc thickness at failure
BrakeTorque=1775.0 // maximum brake torque at zero wear and optimum temp
BrakeHeating=0.00100 // heat added linearly with brake torque times wheel speed (at max disc thickness)
BrakeCooling=(3.60e-002,4.60e-004) // minimum brake cooling rate (base and per unit velocity) (at max disc thickness)
BrakeDuctCooling=1.18e-004 // brake cooling rate per brake duct setting (at max disc thickness)

[REARLEFT]
BumpTravel=-0.020 // suspension travel upwards
ReboundTravel=-0.180 // suspension travel downwards
BumpStopSpring=160000.0 // initial spring rate of bumpstop
BumpStopRisingSpring=1.20e7 // rising spring rate of same (multiplied by deflection squared)
BumpStopDamper=2000.0 // initial damping rate of bumpstop
BumpStopRisingDamper=9.00e5 // rising damper rate of same (multiplied by deflection squared)
BumpStage2=0.090 // speed where damper bump moves from slow to fast
ReboundStage2=-0.090 // speed where damper rebound moves from slow to fast
FrictionTorque=7.81 // Newton-meters of friction between spindle and wheel
SpinInertia=1.260 // inertia in pitch direction including any axle but not brake disc
CGOffsetX=-0.030 // x-offset from graphical center to physical center (NOT IMPLEMENTED)
PushrodSpindle=(-0.175, -0.100, 0.000) // spring/damper connection to spindle or axle (relative to wheel center)
PushrodBody=(-0.205, 0.220, 0.000) // spring/damper connection to body (relative to wheel center)
CamberRange=(-1.0, 0.5, 1)
CamberSetting=0
PressureRange=(100.0, 1.0, 301)
PressureSetting=70
PackerRange=(0.000, 0.001, 1)
PackerSetting=0
SpringMult=1.0 // take into account suspension motion if spring is not attached to spindle (affects physics but not garage display)
SpringRange=(40000.0, 5000.0, 1)
SpringSetting=0
RideHeightRange=(0.1350, 0.005, 1)
RideHeightSetting=0
DamperMult=1.00 // take into account suspension motion if damper is not attached to spindle (affects physics but not garage display)
SlowBumpRange=(4000.0, 250.0, 1)
SlowBumpSetting=0
FastBumpRange=(2500.0, 250.0, 1)
FastBumpSetting=0
SlowReboundRange=(9000.0, 500.0, 1)
SlowReboundSetting=0
FastReboundRange=(5000.0, 500.0, 1)
FastReboundSetting=0
BrakeDiscRange=(0.025, 0.000, 1) // disc thickness
BrakeDiscSetting=0
BrakePadRange=(0, 1, 5) // pad type (not implemented)
BrakePadSetting=2
BrakeDiscInertia=0.600 // inertia per meter of thickness
BrakeOptimumTemp=250.0 // optimum brake temperature in Celsius (peak brake grip)
BrakeFadeRange=400.0 // temperature outside of optimum that brake grip drops to half (too hot or too cold)
BrakeWearRate=1.50e-013 // meters of wear per second at optimum temperature
BrakeFailure=(1.33e-002,7.21e-004) // average and variation in disc thickness at failure
BrakeTorque=1775.0 // maximum brake torque at zero wear and optimum temp
BrakeHeating=0.00125 // heat added linearly with brake torque times wheel speed (at max disc thickness)
BrakeCooling=(1.94e-002,2.45e-004) // minimum brake cooling rate (base and per unit velocity) (at max disc thickness)
BrakeDuctCooling=6.26e-005 // brake cooling rate per brake duct setting (at max disc thickness)

[REARRIGHT]
BumpTravel=-0.020 // suspension travel upwards
ReboundTravel=-0.180 // suspension travel downwards
BumpStopSpring=160000.0 // initial spring rate of bumpstop
BumpStopRisingSpring=1.20e7 // rising spring rate of same (multiplied by deflection squared)
BumpStopDamper=2000.0 // initial damping rate of bumpstop
BumpStopRisingDamper=9.00e5 // rising damper rate of same (multiplied by deflection squared)
BumpStage2=0.090 // speed where damper bump moves from slow to fast
ReboundStage2=-0.090 // speed where damper rebound moves from slow to fast
FrictionTorque=7.81 // Newton-meters of friction between spindle and wheel
SpinInertia=1.260 // inertia in pitch direction including any axle but not brake disc
CGOffsetX=0.030 // x-offset from graphical center to physical center (NOT IMPLEMENTED)
PushrodSpindle=(0.175, -0.100, 0.000) // spring/damper connection to spindle or axle (relative to wheel center)
PushrodBody=(0.205, 0.220, 0.000) // spring/damper connection to body (relative to wheel center)
CamberRange=(-1.0, 0.5, 1)
CamberSetting=0
PressureRange=(100.0, 1.0, 301)
PressureSetting=70
PackerRange=(0.000, 0.001, 1)
PackerSetting=0
SpringMult=1.0 // take into account suspension motion if spring is not attached to spindle (affects physics but not garage display)
SpringRange=(40000.0, 5000.0, 1)
SpringSetting=0
RideHeightRange=(0.1350, 0.005, 1)
RideHeightSetting=0
DamperMult=1.00 // take into account suspension motion if damper is not attached to spindle (affects physics but not garage display)
SlowBumpRange=(4000.0, 250.0, 1)
SlowBumpSetting=0
FastBumpRange=(2500.0, 250.0, 1)
FastBumpSetting=0
SlowReboundRange=(9000.0, 500.0, 1)
SlowReboundSetting=0
FastReboundRange=(5000.0, 500.0, 1)
FastReboundSetting=0
BrakeDiscRange=(0.025, 0.000, 1) // disc thickness
BrakeDiscSetting=0
BrakePadRange=(0, 1, 5) // pad type (not implemented)
BrakePadSetting=2
BrakeDiscInertia=0.600 // inertia per meter of thickness
BrakeOptimumTemp=250.0 // optimum brake temperature in Celsius (peak brake grip)
BrakeFadeRange=400.0 // temperature outside of optimum that brake grip drops to half (too hot or too cold)
BrakeWearRate=1.50e-013 // meters of wear per second at optimum temperature
BrakeFailure=(1.33e-002,7.21e-004) // average and variation in disc thickness at failure
BrakeTorque=1775.0 // maximum brake torque at zero wear and optimum temp
BrakeHeating=0.00125 // heat added linearly with brake torque times wheel speed (at max disc thickness)
BrakeCooling=(1.94e-002,2.45e-004) // minimum brake cooling rate (base and per unit velocity) (at max disc thickness)
BrakeDuctCooling=6.26e-005 // brake cooling rate per brake duct setting (at max disc thickness)**

Engine File

RPMTorque=( 0, -21.5, -21.5)
RPMTorque=( 500, -23.4, 63.4)
RPMTorque=( 1000, -25.3, 124.8)
RPMTorque=( 1500, -28.0, 156.4)
RPMTorque=( 2000, -30.6, 175.6)
RPMTorque=( 2500, -32.6, 196.0)
RPMTorque=( 3000, -36.2, 226.2)
RPMTorque=( 3500, -39.5, 246.8)
RPMTorque=( 4000, -47.7, 251.1)
RPMTorque=( 4500, -55.0, 253.5)
RPMTorque=( 5000, -60.3, 255.4)
RPMTorque=( 5500, -69.6, 257.6)
RPMTorque=( 6000, -78.6, 254.7)
RPMTorque=( 6500, -88.4, 243.9)
RPMTorque=( 7000, -98.8, 223.3)
RPMTorque=( 7500, -110.7, 190.4)
RPMTorque=( 8000, -124.2, 148.0)
RPMTorque=( 8500, -138.1, 102.4)
RPMTorque=( 9000, -153.0, 46.3)
RPMTorque=( 9500, -166.9, -14.6)
RPMTorque=(10000, -179.2, -78.0)
RPMTorque=(10500, -189.9, -132.7)
FuelConsumption=4.400e-005 // affected by throttle position and engine speed
FuelEstimate=1.020 // fudge factor for differences between vehicle types (used for lap estimates and AI pit scheduling)
EngineInertia=0.1725
IdleThrottle=0.75
IdleRPMLogic=(1000.0, 1300.0)
LaunchEfficiency=0.000 // efficiency (0.0-1.0) of launch control, or 0.0 if N/A
LaunchRPMLogic=(3000.0, 4000.0) // holds RPM in this range before launch (used for AI even if launch control is N/A!)
RevLimitRange=(7500.0, 100.0, 1)
RevLimitSetting=0
RevLimitLogic=150.0 // RPM range around current setting where rev limiter operates
EngineMapRange=(0, 1, 1) // 0 = most driveable, max = most power (low gears only) (unimplemented)
EngineMapSetting=0
EngineBrakingMapRange=(0.0, 0.001, 1) // input throttle is ranged from minimum to 100%, with the minimum = setting * step * RPM,
EngineBrakingMapSetting=0 // i.e. if you want 10% throttle at 6000 RPM, set the middle number to 10/6000 = 0.00167
OptimumOilTemp=100.5 // degrees Celsius at which engine operates optimally
CombustionHeat=41.0 // degrees Celsius added per liter of fuel burned
EngineSpeedHeat=8.000e-004 // heat added linearly with engine speed
OilMinimumCooling=7.500e-003 // heat dissipated without oil/water transfer
OilWaterHeatTransfer=(3.900e-001,7.900e-005) // heat transfer from oil to water (base, w/ engine speed)
WaterMinimumCooling=4.000e-003 // base heat dissipated without velocity
RadiatorCooling=(1.780e-006, 4.510e-006) // cooling rate with velocity (base, per setting)
LifetimeEngineRPM=(11770.0,180.0) // (base engine speed for lifetime, range where lifetime is halved)
LifetimeOilTemp=(108.0,2.50) // (base oil temp for lifetime, range where lifetime is halved)
LifetimeAvg=15000 // average lifetime in seconds
LifetimeVar=5500 // lifetime random variance
EngineEmission=(0.20, 0.60, -2.5) // where flames and smoke are emitted (relative to ref frame at rear axle)
EngineSound=(0.20, 0.60, -2.5) // where engine sound is emitted (relative to ref frame at rear axle)
SpeedLimiter=1 // whether there is a pitlane speed limiter
OnboardStarter=1 // whether vehicle restarts when stalled
StarterTiming=(1.5, 0.0, 0.0) // average and variable cranking time, then blend with starting sound

I thought I would post this to show what a racing simulator game actually simulates. Because Rfactor is a moddable game all of the settings are done via a ini type file.