Question

Car physics - Tire/road friction, skidding, and turning

Asked by: imnotapro

I'm developing my first game containing player controlled cars, and therefore ofcourse I need proper car physics. I've got basic car accelleration and turning done, however, no skidding is currently done.

Basically, when a driver drives a car at n speed and applies the brakes 100%, the car will skid IF the friction between the tires and the road isn't enough to hold the car that is still going forward. If the friction is large enough, it would stop at once (like when driving at very slow speeds). When you turn a force is trying to press the car out of the road (when you turn left, the force is pressing the car against right; out of the road). If the friction between the tires and the road is enough to hold it back, the turn goes smoothly, if not, the car will skid against right, uncontrollable if not ABS brakes. That's what I know, so no need to teach me that again.

What I wonder about is ways to calculate this properly (please give me nothing but proper equations/values, otherwise i get a problem getting this done). Basically a way to calculate the breaking resistance (percentage of speed before calculation is the result? per second?) when skidding (time=v*friction, however, that's the time), and to calculate when the breaks are applied too hard, so the car starts skidding (force pushing car forward too much for friction between tires and road to handle). I take things like grass, asphalt, wet asphalt, sand, snow and ice does have different friction values against a normal tire too. Also at some angle, at some speed, the car will probably also stop skidding before it has stopped fully after the breaks are released, so some algorithm to find out about that would also be nice. I don't need more values than velocity and how hard the breaks are applied (percentage 0-100% maybe) I hope, or? Air resistance is done later, and will be applied globally.

That's one of two problems, the next problem is (sharp and fast) turning. I need a way to find if the force pushing trying to push the car out of the road is higher than the friction between the tires and the road, to trigger skidding (accelleration on unrelieable surface; ie ice, can trigger this too I know). The velocity, and the frontwheel angle would be nice values to calculate this from I guess.


Please don't come with waaaay toooo complicated answers, as I'm only 15, and haven't learned anything about this on school (none of my teachers knows this stuff either).

Help is appreciated :)

Added: It's a 3D game!

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-07-24 at 10:29:41ID21070059
Tags

car

,

physics

,

friction

Topic

Physics & Artificial Intelligence in Game Programming

Participating Experts
5
Points
375
Comments
10

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. CD-ROM as car audio player
    i have one extra CD-ROM, so i plan to put it into my car as a audio player so i can play any type of audio cd. anyone has any ideal how can i use the car batery as power to supply to the CD-ROM instance of using the normal way by electricity. thank you very much for all your ...
  2. A star algorithm in road netwoks
    {In the A algorithm the score which is assigned to a node is a combination of the cost of the path so far and the estimated cost to solution. This is normally expressed as an evaluation function f, which involves the sum of of the values returned by two functions g and h, g r...
  3. 2D car physics - make the cars spin!!
    I'm looking for help on a 3D racing car game that I'm doing for my final year project. I'm sticking to 2D physics by ignoring the y-component for now. Given I have the vehicles centre of mass/gravity, velocity, angular_velocity, acceleration, angualar_acceleration abd the int...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: ozoPosted on 2004-07-25 at 01:15:06ID: 11631017

to first order, skidding will start when the accelleration exceeds the coefficient of friction of the surface.
On wet surfaces, you can also hydroplane above a critical speed.

 

by: shirsoftPosted on 2004-07-25 at 03:06:43ID: 11631182

I can't think of the whole soln as of now but it might be helpful to first model a single tyre car instead of all the4 because it would involve some torques and stuff and i , personaly, am not very comfortable with it.
Have a look at ode.org in case u r willing to use 3rd party physics lib

 

by: imnotaproPosted on 2004-07-25 at 09:14:56ID: 11632316

Yes, but well, I was looking for something more concrete, like algorithms to actually calculate when skidding will start and end.

 

by: shirsoftPosted on 2004-07-25 at 12:56:53ID: 11633070

try these 2 links
1. A pdf about realistic trans/rotation of a disc
http://www.physics.emich.edu/dreid/papers/ejp9301.pdf

2. http://www.innerauto.com/innerauto/image/brakov.html
 has an overview of car brakes and animations

 

by: SWorthamPosted on 2004-07-27 at 13:24:04ID: 11650638

I've never done a racing game before but I always wanted to.

For a first step, try to write an algorithm that calculates the car's lateral G's as a whole.  When the lateral G value exceeds .9, for example, switch the car into a partial slide (sliding more & more depending on the lateral G value).  When the car starts to slide and you straighten the steering wheel a little, the lateral G's which naturally fade until the car falls beneath .9 G's for example, then you can switch the car back into a straight path.  Those transitions between sliding and not sliding will take a lot of tweaking to get it right.

After you pass that hurdle, then you'll have to use the same technique with all 4 tires independently and do a lot more calculation to get the car to drift, powerslide, etc.

This task will take a lot more than simple formulas... it'll take lots of time & experimentation.

 

by: izizPosted on 2004-07-28 at 06:47:04ID: 11656350

(for the diagrams you need to copy and paste this into a text editor and use a fixed width font such as courier for it to line up properly)




Friction


max Fr = μR

max Fr = the maximum force due to friction
μ = the coefficient of friction
R = the reaction of the car on the road


For this it is easier to think of the car, C as a particle rather than an object with 4 wheels, ie the car has a constant centre of gravity.


     R
     ^
     |

   -----   --> v
   | C |
-------------- μ
   <-- F


eg a car C travelling at velocity v
ie

the maximum Force due to friction =
      the reaction of the car on the road (which will be equal to it's weight)
      * the coefficient of friction between the car and the road

&#956; will be different for each type of surface but is typically a small fractional value




Acceleration / breaking


You will begin to skid when the force due to breaking exceeds the maximum force due to friction.

This can be worked out by the change in momentum of the car.

F = | mv - mu |
    | ------- |
    |    t    |

F = the breaking force
m = the mass of the car, C
v = the final velocity of the car
u = the initial velocity of the car
t = the time taken for the change in velocity

This can be applied to acceleration as well as breaking (ie wheel spin when accelerating).  Don't forget to take the modulus / absolute value as it's the value of F you are after to check against the maximum frictional force rather than the sign (eg breaking will give you a negative value).




Turning


Turning effectively makes the car C travel in a circular motion and therefore centripetal forces apply.
(bah!  you try drawing a circle using text :p)


   ----------       v
  /          \      ^
 /            \     |
|              |    |
|            |---|  
| max Fr <-- | C |  ---> F
|            |---|
|              |
 \            /
  \          /   (circle has radius r)
   ----------


F = m * v^2
    -------
       r

(v^2 = v*v)


F = the centripetal force pushing the car outwards
m = the mass of the car C
v = the velocity of the car
r = the radius of the circle that it's travelling round
max Fr is the maximum force due to friction

When F is greater than max Fr you will spin out

 

by: izizPosted on 2004-07-28 at 06:50:35ID: 11656397

In my above post the html code #956 is shown...

It's meant to be the Greek Letter Mu (looks like the letter u with a tail on the left side), which is the mathematical symbol for the coefficient of friction (amongst other things).

 

by: imnotaproPosted on 2004-07-28 at 16:33:49ID: 11662491

Thanks, I think I got the idea :).

 

by: abuzzuzPosted on 2004-11-10 at 16:22:51ID: 12550582

Here's a proposal for a SIMPLIFIED physics model

2 variables:
lateralG (positive=G to the right, negative=G to the left)
slidemovement (positive=slide to the right, negative=slide to the left)

lateralG is the lateral load applied to the tires. for our game, we'll make it a function of speed an steering wheel position.
slidemovement is the speed of the sliding motion.
as long as lateralG is whithin the max lateral load of the tire (say 6G), slidemovement will stay 0.
when the max lateral load is exeeded, stop increasing lateralG and start increasing slidemovement instead.

It's like having 2 glasses of water. When the 1rst glass is full (lateralG), go to filling the 2nd glass (slidemovement).


i'd make a 2 wheel model of the car (front and rear) instead of just a one wheel model. this way you can change the maximum G of the front and rear of the car during acceleration/braking to simulate the effects of wheight transfer. you would have a car that oversteers (tail slides) during heavy braking. oversteering will make the player happy :-)
Wheight transfer means that in real life, when you brake, you'll have more weight on the front tires and less on the rear tires. this will effectively increase the max G load of the front tires and decrease that of the rear tires, which will result in tail spin if you turn hard while braking. The inverse effect is observed during accelaration.
You should also decrease the max G of the rear under low speed heavy acceleration to simulate the effect of loss of traction under heavy acceleration on a rear wheel drive car. do the same with the front for a front wheel drive car.

 

by: abuzzuzPosted on 2004-11-10 at 17:07:37ID: 12550810

If the friction between the tires and the road is enough to hold it back, the turn goes smoothly, if not, the car will skid against right, uncontrollable if not ABS brakes

wrong, in real life,  ABS brakes only make a difference when braking. they reduce uncontrollable skidding when braking.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...