New WIP Car Chassis - Feedback wanted!

[Same Thread - New Updates!]
WIP version of a new car chassis I’m working on. Uses an engine with gears and a realistic power curve, and uses BodyThrusters to provide torque for the wheels. (It’s a simple system, but I’m not aware of anyone else using it yet.)
Kinda mediocre at the moment to be honest, but with time I’m hoping this will end up being the most realistic chassis made so far. Test track is just an old place I dug up from 2011.

WASD or Arrow Keys: Drive
Q/E or Z/X: Shift Down/Up while in manual, switch into/out of reverse in automatic
Click the Automatic/Manual Buttons to switch transmission mode

Better gear ratios and acceleration curve
Controller support


It was fun trying to time the shifts right to get maximum acceleration. Is this using the new constraints? I didn’t see any of the usual hinge/motor surface types. For the hills thing, try changing the wheels to balls. Cylinders use a prism as a collision mesh instead of a cylinder, whereas a ball actually uses a sphere.

It’s regular old fashioned hinge, but with PGS enabled and BodyThrusts acting as a couple provide the torque. Why would using a sphere help noticeably for the hills though?

Sixth gear seems to high compared to fifth gear.

The ratios need rebalancing altogether really. What ratios do you suggest? (1st is 3.4, 6th is 0.8 currently, I think)

This is a plot of the torque curves in each gear that I had to produce last year for coursework. It might (?) be useful in some cases; i.e. it’s interesting that 6th gear has almost no speed increase over 5th etc.

Using a sphere might provide slightly better contact on bumpy surfaces, however I’d recommend just increasing the friction on the existing cylinders instead (assuming they’re not already maxxed).

1 Like

Well, like I said, the cylinder object has flat surfaces on its circumference whereas the sphere is perfectly round (physics-wise). Better road contact and backwards compatibility physics engine-wise.

Here’s a real-world experiment on polygonal wheels:

1 Like

Added RWD and AWD. Not tried spheres yet due to having to reweld everything and aintnobody got time for that.

Edit: Actually I couldn’t use spheres anyway because it would make the brake pads useless.

There’s an answer for that, of course:

put the brake shoes on the exterior of the wheel.

Also, I recommend moving the shifting from Q and E to Z and X. With shifting on Q and E, whenever you want to shift up you have to stop turning because the pointer finger has to move from D to E or ring finger from A to Q. With shifting on Z and X you can use your thumb to shift, which means steering (and power and braking) is unimpeded.

1 Like

oh jeez


This is a common misconception–contact area has no bearing on traction. Columb friction only depends on normal force and the coefficient of friction. Normal force is independent of contact area–you can usually assume it’s the same as weight.

The contact patch does get used in more complex tire models, but this is roblox so we only get to play with rigid bodies.

On topic, here’s a torque curve I fitted to data from an F-150’s EcoBoost engine last year if it saves you any time.

local function torque(rpm)
	return 0.8588583362369183 + rpm*(0.04962967808962938 + rpm*(0.00016056605121876855 + rpm*(-8.098447932158415e-8 + (1.4239713529306407e-11 - 8.753219631047758e-16*rpm)*rpm)))

looks like



You see, I was not talking about contact patch, but amount of time there is contact with the road. I know that rigid bodies don’t care about contact patch because I’ve done my own studying of vehicle dynamics.

The mythbusters square wheels video is the extreme example of what I was referring to:

There is a NHO that occurs on madattak’s car models at certain wheel rotation speeds that makes the car bounce up and down. I suspect it’s because the wheels aren’t perfectly round.


I just got some time to test that out. Wheels aren’t perfectly round, but they’re more accurate than the 24-edge model that’s rendered. They should never slip just by driving forward as long as elasticity is zero and friction is high.

If the rendered model were used for physics, the minimum distance between the center and any given edge would be 0.991445r or something. The minimum distance I could get from experimentation was ~0.9989r, which either means they use a cylinder model with 120 sides or (more likely) it’s hardcoded.

I plotted radius vs angle and the result looks pretty weird.

The horizontal axis goes from 0 to 360 degrees, and the vertical axis goes from 0.9989% to 1.001% of the set radius.

Loss of contact with the baseplate would be shown by a concave-down curve. That doesn’t happen, so it’s reasonable to assume that it never loses contact. I can see it messing up some assemblies that need to be perfect, but it won’t cause meaningful slip.

The resonance might indicate that the wheel’s elasticity is higher than zero. If that’s the case, setting it to zero will fix that.

1 Like

Still on holiday, so no updates yet. Trying to solve a problem though, and failing:

  • An engine can only supply a limited amount of energy per second
  • Therefore there is a maximum increase in kinetic energy per second possible
  • Therefore, no matter the gear ratio, the car has an upper limit on its acceleration

The question is, how to find this limit, and how to translate that to a change in torque, as the current simplistic system just reads off the power curve and multiplies by the gear ratio, but this gives cars lots of acceleration while simultaneously not having enough torque to climb shallow hills. (Even with high friction)

try experimenting with drag, either at the internal level (i.e. drag is applied at torque) or an external level (drag is applied via BodyVelocity/BodyThrust). As the car increases its velocity, so does drag, limiting acceleration.

I like the manual version quite a bit- but I’ve never driven a stick shift with a 0 gear (neutral?), a 7th gear and no reverse. Am I missing something? I know this is currently just a cool tech demo, but having sounds which imitate a normal engine can help you determine when it’s time to shift in the manual mode.

Usually in normal automatic cars, 6th gear can bring you all the way up to the top speed, where 5th gear can’t. When I used the fully automatic car, I was going 120 studs/sec in 5th gear.

The wheels experience some sort of phantom drag when spinning anyway, it’s quite significant. ( Even with all friction turned to zero and collisions off)
To elaborate my problem, imagine it’s an electric engine that produces a constant power output. (Eg 1kw) In my system, constant power= constant torque. High gear ratios = more torque, so under my model you could just make a super high gear ratio and get a super fast car from a tiny motor.

Thanks, I actually started making it two days before I left so it is very rushed XD
I can’t remember when I added the 7th gear, I was just messing around to see what happens, pretty sure only super cars or trucks have more than 6 gears normally :stuck_out_tongue: If I remember correctly, 0 is actually reverse as I didn’t have time to code reverse in properly.

When I get back Ill go over the autos gear ratios, possibly just remove 6th as being unneeded if it’s not getting much extra speed.

Anyone who has a good car sound, plz can I have it? :slight_smile:

You could just steal the engine sound from SS3, I’m sure the creator won’t mind.

This might be of some use; it’s the (paraphrased) code I used to make the torque curves 'n stuff I posted above. It might give an idea of the number of parameters used to “predict” the performance.

The total drag on the car (in kN) is given by the equation below (where veh_speed is the speed of the car in m/s at any given point, A is the frontal area taken as the height*width, Cd is the drag coefficient, generally about ~0.3 for a standard family car, decreasing down to ~0.05 for a top-end supercar, and rho is the density of the air, ~1.225 kg/m^3. “ad” is the drag due to the surface the tyres are in contact with, and is a figure roughly between 0.01 and 0.3)
I’m aware I haven’t said what bd is; that’s because I don’t remember, and have to wait to download MatLab again so I can check in the actual file.

Total_Drag = (VehicleMass+DriverMass)*gravity*(ad + bd*veh_speed)+1/2*rho*A*Cd*veh_speed^2

The maximum power available from the engine at any given point is calculated by several equations.
Number 1 (where EngineSpeed is the current base engine speed in rpm; i.e. what the crankshaft is rotating at).

EngSpdRad = EngineSpeed*2*pi/60

Number 2 (unfortunately I don’t have the code for the torque map, it was produced using a seperate program I didn’t write :confused:
X-axis is engine speed in rpm, Y-axis is Nm)

EngPower = EngSpdRad*EngineTorque

Then, taking the largest value from the previous calculation,

CurrentTractiveEffort = maxPower/veh_speed

(Now, bare in mind that this value is not the actual tractive effort figure; we haven’t discussed gears yet…)

So, moving onto the actual fun stuff…

In this calculation the EngineTorque is the current torque the engine is producing. As I don’t know quite how this is calculated I can only suggest you set the torque to a figure roughly based on the Y-axis figures in the image above, given the current engine speed (in rpm).
(FinalDriveRatio is a figure generally between 3 and 5, GearRatios[i] will be a table of ratios; I can’t check what figures they are until I’ve downloaded MatLab again, which I’ll try do overnight. Yes, overnight… It’s a 2GB file and our internet is <2mb/s… RollingRadius is [I think] simply the radius of the tyre)

for i = 1,6 do
    TractiveEffort = (EngineTorque*FinalDriveRatio*GearRatios[i]*transEfficiency)/RollingRadius
    veh_speed = EngSpdRad/GearRatios[i]*FinalDriveRatio*2*pi*RollingRadius/60

Here are a few images that might be of additional use to see standard torque and power curves against vehicle speed (taken from my course documents).

Hope all this help a bit and doesn’t just add confusion lol


Thanks! Don’t understand it fully yet, but should help.