[Car Physics] - Precision about the Traction Circle

This topic is 2821 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi everyone.
I am doing some great progress on my Racing Simulation and i have to say that GD forum helped me a lot.
(Please forgive my english, i am doing my best ^^)

I am at the point where i need to add the friction circle to my simulation.
Right now Longitudinal Force and Lateral Force are calculated separately and do not interact with each other.

(I will use some very explicit values for easy understanding.)

Let say that the radius of my traction circle is 10.
Let say that the maximum force the tire can provide is 10 (Lateral and Longitudinal).

Now, if i brake and turn at high speed let's say that the lateral force and the longitudinal force are bothes 10.

The total Traction Force will be Flat + Flong = 20. That mean that the total force is the double of the traction circle radius limit.

My question is :
Does this mean that the resulting force is going to be divided by 2 for bothes forces in order to saty in the traction circle ?
The resulting Force would be 5 and 5 to fit in the circle ?

Another case. If the longitudinal Force is 10. I will occupy all the space in the traction circle right ?
So, if the longitudinal force cames in, will it be 0 ??

This has been confusing to me..
Does anyone have experience or already implemented a traction circle ?

Any help would be greatly appreciated.
Regards.

Share on other sites
Not divided by 2.

It follows the rules of 2d normalization.
Take a look at these images: https://www.google.com/search?q=unit+circle

The components of your friction can be any coordinate pair along the circle, scaled by any scalar.

You can start by drawing a circle, with a radius of your friction limit. Then draw a line from the center outward, indicating the direction the force shall act. Any bit of the line that extends beyond the circle will be clipped, and you will be left only with the line that goes from the center to the circle. If the original friction vector did not reach the circle it wont be clipped.

This is a very simplistic explanation.

Friction will respond equally and oppositely, up until the friction limit, which is at the circle's edge. At that point it doesnt matter which direction you're going, it simply can't provide any more response force.

If you were using all 10 units of friction force in the longitudinal direction, and you needed some force in the latitude direction, it would immediately put you outside of the circle and the static friction would be broken / response clipped. How ever much friction is left over from either direction is how much you can use for the other. This is why it's not a good idea to use your brakes when you are cornering at the limit. Or vise versa. Friction response direction should be smoothly transferred between forward and side accelerations to not break this circle.

Share on other sites
bzroom, thank you very much for your input.

You can start by drawing a circle, with a radius of your friction limit. Then draw a line from the center outward, indicating the direction the force shall act. Any bit of the line that extends beyond the circle will be clipped, and you will be left only with the line that goes from the center to the circle. If the original friction vector did not reach the circle it wont be clipped.[/quote]

The components of your friction can be any coordinate pair along the circle, scaled by any scalar.[/quote]

So a simple model like that would be correct ?
 var latVec = (x, x); var longVec = (x, x); var finalVec = latVec + longVec; if (finalVec.length > cicleRadius) { finalVec.normalize(); finalVec.multiply( circleRadius ); } 
Then i could use this finalVec to add the resulting friction ?

Share on other sites
hum after reading again, my model showed above is not correct i think...
So basically the first force who enter the traction circle has the priority over the second one...
The basically the case of 10 lateral and 10 longitudinal is not possible..
Whatever i do the result of the two vectors will always be inside 10.

So, any forces, lateral or longitudinal need to check the available space in the circle.
I think i understand and know how to apply this to my game.

Thank you again !

Share on other sites
There's no priority, your pseudo code is correct.

vec2 inputForce = (x,y);
vec2 forceResponse = -inputForce;

if( forceResponse.Length( ) > MaxForce )
forceResponse.SetMagnitude( MaxForce );

Of course this is extremely simple and sort of fakes the interaction between static and kinetic friction.

Share on other sites
I'm not sure if the code above does what i do, so heres my explanation anyway.

It's usually a case of using the longitude and lateral forces as a vector and testing whether the magnitude ( length ) of this vector exceeds some maximum length , ( traction circle radius ).

To calculate the length of the vector

magnitude = sqr ( (long_force * long_force) + (lat_force * lat_force) )

Then test the length of the vector and if it exceeds a maximum length, normalise the vector and multiply it by the maximum length.

if magnitude > max_length

if magnitude <> 0 // divide by 0 check

long_vec = long_force / magnitude // normalised vector
lat_vec = lat_force / magnitude // normalised vector

long_force = long_vec * max_length // length now at maximum
lat_force = lat_vec * max_length // length now at maximum

// the long and lat forces defined as a vector are now at it's permmitted maximum length but retains it's direction.

endif

endif

This is only one technique though.

I've read that Ruud Van Gaal's Racer only reduces the long force to maintain a maximum traction circle length.

ie, favouring losing longtiude grip over lateral.

Whereas my code reduces both long and lat forces.

Also worth mentioning is that some sims use a traction elipse instead of a traction circle.

KJM

Share on other sites
Hi, bzroom, K_J_M

There's no priority, your pseudo code is correct.[/quote]
Yes, my first guess was right. I finally implemented the traction circle successfully !

I am really happy, my racing game realism just get to a next level only with the traction circle implementation !
It was the missing component to add a lot of new features.

My car behave quite good i have to say.
Thanks to the friction circle, i can no do some Donuts and maybe very soon some controlled drift !

The code i gave in the 3 rd post was working for me.
I hope it can help anyone.

Thank you again for your help guys.

Share on other sites
Well done [color="#284b72"]jujunosuke.

KJM

Share on other sites
Can you please record a youtube video? Or provide us a demo. Is like to see what you've done

• Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 16
• 11
• 24
• 43
• 75
×

Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!