# Wheel Friction Curve

Discussion in 'Physics' started by samba, Sep 8, 2015.

1. ### samba

Joined:
Feb 25, 2015
Posts:
7
Hi ,

Can any one please explain regarding wheel friction curve and its attributes and values in detail..?

2. ### angrypenguin

Joined:
Dec 29, 2011
Posts:
15,620
You might have more luck with a more specific question.

3. ### samba

Joined:
Feb 25, 2015
Posts:
7
As you know there is wheel friction curve concept in wheel collider which is mainly used for sliding the vehicle wheels. Again in the wheel friction curve having forward friction and sideways friction can u explain the properties of extremum value , extremum slip, asymptote value and asymptote slip

4. ### Edy

Joined:
Jun 3, 2010
Posts:
2,510
MagyarPeter likes this.
5. ### samba

Joined:
Feb 25, 2015
Posts:
7

I read the link by providing by you.But still not getting how the curve values will calculate on wheel.

Actually i am working on wheel friction curve to get drifting effect like in asphalt 8. to get that effect i am just tweaking the values since 1 week still did't get that effect. please suggest me. do i need to read any concept before start with wheel friction curve. to understand above values.

Last edited: Sep 9, 2015
6. ### Edy

Joined:
Jun 3, 2010
Posts:
2,510
Oh, that's the WheelCollider in Unity 4:
• Set a Damper value around 200-600. Zero damper is not a good idea.
• Set Stiffness Factor to 0.01 - 0.03 at both forward and sideways frictions.
You'll get something driveable. Experiment with the stiffness values for fine tunning the effect. Note that WheelCollider in Unity 4 has its own design faults and it will never work perfectly. Most likely you'll get either a sliding vehicle, or a vehicle that rolls over easily at curves.

Your best chance is to find a proper sideways stiffness factor that mostly works in your specific case. If the vehicle rolls over, either decrease the stiffness or lower the position of the Center of Mass for the vehicle. You can also check out this article on how to increase stability by simulating anti-roll bars:

Hope this helps!

7. ### odival

Joined:
Jun 11, 2014
Posts:
57
What if you're using Unity 5's wheel collider, whats the average values to get a car that can drift at the corners?

8. ### Edy

Joined:
Jun 3, 2010
Posts:
2,510
I've been unable to extract any logic out of the Unity 5 WheelCollider's friction curves. My vehicle physics packages disable the WheelCollider friction (zero to all values) and implement the tire forces by scripting.

odival likes this.
9. ### odival

Joined:
Jun 11, 2014
Posts:
57
Thats too bad, thanks for the input anyway. I keep seeing videos on youtube of people who used U5's wheel collider and managed to get the car to drift without helper codes, but they're usually vague on how they achieved this and I could not reproduce the intended behaviour.
=(

10. ### Edy

Joined:
Jun 3, 2010
Posts:
2,510
That's understandable because even with precise WheelCollider settings the behavior will surely be different in different vehicles. The WheelCollider behavior is heavily affected by many other properties of the vehicle such as the mass, the center of mass or the inertia tensor. Thus, the only 100% reliable way of reproducing a specific behavior without helper codes is to having an exact clone of the vehicle.

odival likes this.
11. ### s5ehfr9

Joined:
Sep 7, 2018
Posts:
1
What about the friction curve of tank tracks? I'm recently making a tank control script that's supposed to be realistic, but Unity's wheel collider seems to be focused on wheels with rubber tires and not metal continuous tracks.

12. ### MathewHI

Joined:
Mar 29, 2016
Posts:
501
Somethings I think just translating your cars transform and customizing your handling is better than the wheelcollider, the friction curve is too difficult to get right. Keep in mind though you can’t just find one set of perfect values for the friction curve and then just forget it. The way to truly get your desired behavior is to dynamically change the values through scripts.

13. ### Edy

Joined:
Jun 3, 2010
Posts:
2,510
Another possible trick for purely arcade vehicles is just using a CharacterController but with a car mesh. One could use scripting for the visual car to have its wheels on the ground, then develop the gameplay by applying rules to the CharacterController (i.e. rotation rate based on the forward speed and so on).

14. ### sebj

Joined:
Dec 4, 2013
Posts:
70
With the PhysX implementation definitely, but I wouldn't write off physics-based control in general.

I created a wheel-force based controller with an arcade-y style. For sure, it's early days (just finished writing it up yesterday!) and mostly for fun, but it seems to behave really well, in that its easy to tune, with parameters that are not too sensitive and have few side effects.

It does this by using the same approach as the WheelCollider, but with simplified dynamics, and solutions to numerical stability that don't involve over-damping or magic numbers.

Even with impulse based physics engines its (usually) possible to compute the exact inputs required to get basically position control of simulated objects, but now you have the ability to let the engine loose when you don't want to code the behaviours by hand!

15. ### artemiusgreat

Joined:
Sep 25, 2018
Posts:
2
Need to share some observations regarding built-in wheel collider.
It's all related to this free Vehicle Tools provided by Unity.
https://assetstore.unity.com/packages/essentials/tutorial-projects/vehicle-tools-83660
I tried to turn behavior of the family car in this asset into a behavior of a racing car to understand physics of WC.
Disable Easy Suspension script to customize WC params manually.

Controller params.

Code (CSharp):
1.
2. Rigid Body Mass: 2000
3. Max Torque: 1000                    // set RPM to 10000, it will go to 100 kmh in 3 seconds and can climb mountains
4. Brake Torque: 30000
5.
6. WC params
7.
8. Mass: 20
10. Wheel Damping Rate: 0.5 .         // ability to save current state, set close to 0 to accelerate faster
11. Suspension Distance: 0              // switch between lamborghini (0) and monster truck mode (5)
12. Force App Point Distance: 0 .     // can flip after sudden turn, increase to 100 to push car to the ground but harder to turn
13.
14. Spring: 10000                             // useless
15. Damper: 10000                           // useless
16. Target Position: 0.5                     // useless
17.
18. Forward Friction.
19.
20. Extremum Slip: 1
21. Extremum Value: 1                      // increase to 5 to accelerate faster
22. Asymptote Slip: 1                        // useless
23. Asymptote Value: 1                     // useless
24. Stiffness: 1                                  // just a coefficient that increase an impact of Value
25.
26. Sideways Friction.
27.
28. Extremum Slip: 1                         // when Slip == Value, it looks like a DRIFT mode
29. Extremum Value: 1                      // increase to 5 to simulate unrealistic turns to 90 degrees, like in GTA, can flip easily
30. Asymptote Slip: 1                        // useless
31. Asymptote Value: 1                     // useless
32. Stiffness: 1                                  // just a coefficient that increase an impact of Value
33.
P.S. Useless doesn't means that parameter doesn't make sense at all, it just means that it doesn't affect my gameplay experience significantly and can be set to some default value.

fren likes this.

Joined:
May 13, 2019
Posts:
29
Unity.WheelCollider is bad, better use custom WheelCollider.

17. ### KouroshX98

Joined:
Feb 8, 2018
Posts:
24
I Have figured out the physics for cars and i could finally get them to work in unity correctly.i will be making a video tutorial next week explaining everything about friction.actually there was more concepts than what i thought!

Ian094 likes this.

Joined:
Aug 11, 2014
Posts:
20

KOemxe likes this.
19. ### KouroshX98

Joined:
Feb 8, 2018
Posts:
24
Hi, sorry if i'm replying very late but good news, i wanted to make the video but at that point i did not have a powerful PC to handle recording. now i have a bought a 9900k rtx 2080 and 16 gigs of ram . i also created a youtube channel that i will be thankful if you subscribe to my channel. my channel name is selen games. i have not made the car physics tutorial yet but i plan to make it in the upcoming months. its a bit complicated and long tutorial so i have to work more on it to make good content.

Edy likes this.

Joined:
Nov 3, 2021
Posts:
1