Skip to main content
GameDev.net gamedev.net
🔒 Locked

Car Physics

Started by Surge Jan 6, 2002 at 9:12 PM 8 replies 850+ views
Original Post
Surge
Surge
Ok, I was thinking about making a street racing simulator. I want it to be as realistic as possible. I was wondering if anyone knows a way to find out how fast a wheel accelerates based on a certain friction on the wheels and a given amount of torque in the engine, also if the wheel spins faster then the friction can handle, how do I find out if the wheel is skidding. I was also wondering how I might implement the back wheel going faster then the front, resulting in a wheelie.
LOWORBIT
LOWORBIT
I recommend paying close attention in your high school pyhsics class.

Some buzz words to research,

vectors - to make programming the enigine simplier you might want to start with doing calculations based on vectors, this sucks to a certain extent, because your dealing with trig, ie sin/cos/tan are slow to calc, but it should be easier to implent and alot easier to understand then calc.

f=ma learn what mass, acceleration, velocity, the fact that velocity and speed are 2 DIFFERNT things, forces invovled in the car, force created by the engine, gear box, power from gear box to each wheel, left and right (front/back/or all 4 if a 4x4) wheels and there force on the ground. Then gravity when the car gets airborne, or if the car dosen''t get airborne by it''s body lift is to high. Anyways, essently the cars are bound by 6 directions and 3 directions of rotation, Up, down, left, right, forward, backward then the rotation, pitch (up and down), roll (rolling side to side), yaw (turning left and right, as if going around a corner). So calculate force forward minus force reverse
force up vers force down, force side right vs force side left.

This is a very rudemnety pyhsics model, your reducing the entire car to one object, when lots of things effect the car not nessarily at it''s center of mass. Like the wheels turning its redirecting thier force (if front wheel drive) or redirecting the driving wheels force (rear wheel drive)

coefficent of friction - this will tell you if the force on the wheel will cause it to loose it''s grip and skid.
Ie the coefficent of friction of bald tires in rain is really low, but the coefficent of friction of grooved tires, which actually contact the road more, is higher so they are less likley to skid. Remember, a tire can also skid side to side around corners

Simple Machines - you need to become very knowledgable with wheels, learn everything you can about centrifical force, and circular based force.

Hopefully this gives you something to look for

-Scott
for some unrelated chem crap

PV=nRT
mol=6.02x10^23
2HCl + 2Zn = 2ZnCl + H2 Goahead, dissolve that penny, their useless

-Scott
Dredge-Master
Dredge-Master
do you know what a moment is? if so, you have the centre of gravity of the car (could even be on the drivers side, near his bum as the engine is heavier in a front wheel drive car, and location of the rear wheels (in a rear wheel drive only car).

You have two forces being forced linearly along the road from the rear wheels. Use these two forces for to find their moments, then these would have to be greater than the moment created by the mass of the car along its centre of gravity for the car to start lifting (a wheelie as you put it).


For the friction you would firstly need to find the coef of friction, which is my problem in all my stuff. These will change upon your tire and surface and so on, which really ticks me off so I can never be bothered writing car games any more.



Beer - the love catalyst
good ol' homepage

Edited by - Dredge-Master on January 7, 2002 2:47:41 AM
Beer - the love catalystgood ol' homepage
MiNDHiVE
MiNDHiVE
http://www.neutralzone.org/home/faqsys/cates/papers.html

Check out ''The Physics of Racing'' articles. They''re aimed more at an actual race driver rather than from a programming perspective, but if you want to make an enjoyable simulation then that may be a good thing. In any case, all the relevant physics (much more that you''d need for a simple driving model) are there.
http://www.deakin.edu.au/~bradleyj/unsanity/
Surge
Surge
Thanks I think that site will be of help, but the files are in a Mac format, is there any way for me to view the text with HTML or notepad?
MiNDHiVE
MiNDHiVE
They''re postscript files aren''t they? Do a search on Google for a postscript viewer. Or get Linux
http://www.deakin.edu.au/~bradleyj/unsanity/
core
core
I spotted a new series of GameDev tutorials that are right up your alley. Check toward the bottom of the

Physics Tutorials list.
peanutt
peanutt
Mathews site has a few tuts and now has some free source code.
http://www.btinternet.com/~matthew.bennett/index.htm

Im actually working with Matt and a few other guys making a story based street racing game.
Matt has a small old demo of his first engine on his site and since then we have gotten pretty far. We have our custom model formats and model viewers anmd matt has real car physics in the way of suspension movement to engine data etc etc and we are currently puting together a new small demo with one of our test models, that is around 8000 polys and looks sweet.
We dont have our website online quite yet as we wanna get a proper demo running before we try get some interest in the project. But lets say we have heaps of car models code etc and screenshots ready to show everyone when the site goes live.
We have about a team 6 of us working on it and have been going strong for about 7 or so months now.

Cheers
Adam

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.