After countless of hours trying to understand how wheel colliders work, reading all forum threads that explain how bad the Unity's wheel colliders are and goint through several custom, but difficult to use, wheel controllers, I finally managed to understand how to apply correct values to my case.. extremely thankful for your video! It's just crazy to think how a well explained and executed 20 minute video can turn the tide of a project on a positive roll. I was starting to lose faith in creating the car game of my vision, but you dude restored it. Definitely earned my subscription, thank you again! Looking forward to watching your other videos. 😁
At the beginning you mixed up the Wheel Damping Ratio with the suspension Damper value. The Wheel Damping Ratio is the amount of reduction to the wheel angular velocity when no torque is applied to it. It's a kind of "hub" friction slowing down the rotation of the wheel over time. Has nothing to do with the behavior of the suspension.
Thanks for the explanation, it is somewhat difficult, I have even tried to apply the Ackermann formula but in personalized cars it is difficult to obtain the values. I have seen that skids can be avoided with code, if you can talk about these aspects and solutions in a video, it would be very helpful.
Thank you so much for the explanations, especially for the wheel friction curves. And I want to ask something because it's confusing me for a while: how do we measure the friction forces (measure unit)? Are they in Newton or G-Forces or something else? For example: Some racing cars can turn at high Gs (3G~5G like F1). So, are the friction units like these G-Forces or they are in Newton? Thanks.
Friction is a force hence it's measured in Newtons. When turning you can measure the force that is turning a vehicle and you can see the acceleration of the vehicle due to that force. F=m*a where F is the force, m is the mass of the vehicle and a is the acceleration. If you divide F/M you will get the acceleration of the vehicle which is measured in m/s. So if you have a 20kN vehicle (2tonnes) and apply a force of 400kN you would get the vehicle to accelerate at 20m/s. We do know that one G is 9.8m/s so the acceleration of the vehicle is ~2G. Hence you can say that it 2G of force is applied to the vehicle, when turning or accelerating.
Mathematically you can get the law of conservation of energy, derive it once and you will get the acceleration of an object. So 1/2mU(t)^2 dt = F*t dt Which gives you m*a(t)=F => a(t)=F/m
Thank you very much. It's more clear now. I'm trying to create my own realistic car physics and I really wanted to understand this point. Thanks again. And is it the same about the slip angle? In Unity, I usually set the extremum slip to about 0.25 for forward, 0.4 for sideway; and the asymptotic at 0.5 forward, 0.8 sideway. Is that the right settings for a racecar ? (I know it may also depends on other parameters) What would you advise me? Thanks.
I think you made a small mistake while explaining wheel dampening rate, cause it is the rate at which the wheel will tend to come to a rest from a state of rotational motion, not related to the suspension. I've experimentally tested this and found out that this explanation seems working better Anyways nice and helpful tutorial
You are right! I never thought that dampening would be applied to the rotation of the wheel so I just thought it was the suspension dampening. Nice explanation 😊
well, im working on the suspension part, but for sideways friction of each of the wheels- Extremum slip: 0.6 Extremum value: 3 Asymptote slip: 2 Asymptote value: 3 Stiffness: 1 for front wheels, 2 for rear wheels these worked quite well for me when I tried to take corners at high speeds
Since you understand these physics so well, could you potentially try and create wheel physics using raycasts? (don't have to be complicated like Pacejka) There's not many tutorials out there on the topic and I feel having someone explain it in the way you did this video would help so many developers not be reliant on the WheelColliders within Unity
Hola, encantado por tus explicaciones, pero si me puedes ayudar, necesito los valores del well collider para evitar el subviraje ya que a poca velocidad todo va bien pero al aumentar la velocidad me quedo sin dirección en las ruedas, atentamente Alfonso.
Lo que estas buscando, creo que es amentar la cantidad de friccion lateral que pueen experimentar tus ruedas delanteras, de todos modos, como bien ha comentado el chico, en el video, asegurate de que en casos asi, la curva de perdida friccion sea mas larga, en este caso puedes aumentar el asymptote value muy poco y alargar el asymptote slip mas, , alargalo hasta que el subviraje, que sufres vaya mas acorde con la velocidad que alcanza la rueda. ademas de que haga una caida menos abrupta. Suerte!
Yeah definitely, you can change them this way WheelFrictionCurve myWfc; myWfc = _colliderRR.sidewaysFriction; myWfc.extremumSlip = 0.1f; _colliderRR.sidewaysFriction = myWfc;
Hello, delighted by your explanations, but if you can help me, I need the values of the well collider to avoid understeer since at low speed everything goes well but when the speed increases I am left without direction in the wheels, sincerely Alfonso.
In the real world you would have forward friction to be higher in general than sideways friction. Then the extremum slip should be lower than asymptote slip and the extremum value should be higher. Think of it like the value of traction before breaking traction is the extremum value. After you lose traction the traction value should be lower.
@@nanousis Thanks a lot, I'll try to do that here, if you can make a video creating the most realistic configuration possible it would help a lot, but anyway now I know where to start.
@@nanousis Sir sir sir I wanna ask u something, actually I am from commerce background(accounts stuff u know) but wanna learn more more and more about game programming so if I learn physics and maths from a institute will it work for me ???
@@gabbargamer2007 hey yo you wanna make a car game with me? I have already made a huge progress but I'm now stuck at the traffic system and racing modes it's just I don't have much prior time so if you wanna join me in my game
If I had to give credit to someone who actually taught me wheel colliders. It's you my guy. Also a small question What if.. I had wheel colliders but also had mesh colliders of the wheels set on? (My engine kept crashing)
I am really happy the video helped you understand how whelp colliders worked 😊 as for the wheel colliders with a mesh collider it wouldn't really work since it would mean that two different colliders would collidide every frame. It would create some really strange behavior
I'm working on a top-down shooter tutorial with first tutorial being movement. After that I'll probably come back to the racing game tutorial and either do an engine simulation( gears and sound) or do a lap system.
ahh thank you so much, its very helpfull,, anyway sir, how to combine wheel collider with wheel object (mesh)? i want to make a simple suspension for the vehicles in the game "unturned", because all the vehicles in unturned have a stiff and very strange suspension, between the wheels and the car body are rigid and very stiff, when the car passes something, instead of the tires the car moves up and down, the tires instead attached to the car body ... Unturned is an open source game so we don't need to worry about changing content, this game is very modable edit: sorry for my bad grammars :)
I actually I'm not sure if it is implemented on my code but to do this you just need the wheel meshes to follow the position of the wheel colliders. So it should be as easy as a single line of code per wheel.
@@nanousis σε κατάλαβα από την φωνή... hehe. When i add the wheel colider in the car tire the colider in most likely bugged and not sync with the collider.
After countless of hours trying to understand how wheel colliders work, reading all forum threads that explain how bad the Unity's wheel colliders are and goint through several custom, but difficult to use, wheel controllers, I finally managed to understand how to apply correct values to my case.. extremely thankful for your video!
It's just crazy to think how a well explained and executed 20 minute video can turn the tide of a project on a positive roll. I was starting to lose faith in creating the car game of my vision, but you dude restored it. Definitely earned my subscription, thank you again! Looking forward to watching your other videos. 😁
was looking everywhere for how these friction values are actually calculated, thanks
Glad I helped 😊
Love your Unity tutorials, keep expanding the car related series it's really helpful!
Thanks man, appreciate the feedback🙏
Thank you very much for this explanation!! Helped me a lot to create an university project
Fantastic class! Keep up with the good job! Greetings from Brazil!
What a Legend! Thank you, man! Hope you'll do more tutorials. I've recently watched like dozens this topic related videos and your ones the best.
Glad to know I have helped you mate🙏
this is the best video on wheel collider.
Thanks man, I appreciate it
Love your tutorials man, it's really help a lot. Thank you for doing this and i am waiting for new tutorials.
Thanks man, I try to make the tutorials as helpful as I can. If you want any other topic explained feel free to let me know 🙏
Thank you for this tutorial on wheel collider. It has been very helpful for my commercial projects.
At the beginning you mixed up the Wheel Damping Ratio with the suspension Damper value. The Wheel Damping Ratio is the amount of reduction to the wheel angular velocity when no torque is applied to it. It's a kind of "hub" friction slowing down the rotation of the wheel over time. Has nothing to do with the behavior of the suspension.
Thanks for the explanation, it is somewhat difficult, I have even tried to apply the Ackermann formula but in personalized cars it is difficult to obtain the values. I have seen that skids can be avoided with code, if you can talk about these aspects and solutions in a video, it would be very helpful.
Thank you so much for the explanations, especially for the wheel friction curves.
And I want to ask something because it's confusing me for a while: how do we measure the friction forces (measure unit)? Are they in Newton or G-Forces or something else? For example: Some racing cars can turn at high Gs (3G~5G like F1). So, are the friction units like these G-Forces or they are in Newton? Thanks.
Friction is a force hence it's measured in Newtons. When turning you can measure the force that is turning a vehicle and you can see the acceleration of the vehicle due to that force. F=m*a where F is the force, m is the mass of the vehicle and a is the acceleration. If you divide F/M you will get the acceleration of the vehicle which is measured in m/s. So if you have a 20kN vehicle (2tonnes) and apply a force of 400kN you would get the vehicle to accelerate at 20m/s. We do know that one G is 9.8m/s so the acceleration of the vehicle is ~2G. Hence you can say that it 2G of force is applied to the vehicle, when turning or accelerating.
Mathematically you can get the law of conservation of energy, derive it once and you will get the acceleration of an object. So
1/2mU(t)^2 dt = F*t dt
Which gives you m*a(t)=F
=> a(t)=F/m
Thank you very much. It's more clear now. I'm trying to create my own realistic car physics and I really wanted to understand this point. Thanks again.
And is it the same about the slip angle? In Unity, I usually set the extremum slip to about 0.25 for forward, 0.4 for sideway; and the asymptotic at 0.5 forward, 0.8 sideway. Is that the right settings for a racecar ? (I know it may also depends on other parameters) What would you advise me? Thanks.
Very good tutorial. Really cleared things up for me.
Thanks man I appreciate it 😊
Hi, Have you found a workaround for the vibration of wheel colliders when a car or airplane is idle?
Thanks for the video.
Nice Video...Well Explained. i will definetely share it with my friends and colleagues
I appreciate it mate 😊
I think you made a small mistake while explaining wheel dampening rate, cause it is the rate at which the wheel will tend to come to a rest from a state of rotational motion, not related to the suspension. I've experimentally tested this and found out that this explanation seems working better
Anyways nice and helpful tutorial
You are right! I never thought that dampening would be applied to the rotation of the wheel so I just thought it was the suspension dampening. Nice explanation 😊
Hi I am creating a forklift game and I need the forklift to turn 90 degrees by only rotating the rearwheels. What would be the best way to do this?
I would say invert the rear and front wheels.
Nice work. Please upload more car related video(physics).
Thanks man, I definitely have a few physics videos planned. 🙏
I want to make a small RC toy car. Is it possible to scale the car so physics still work @ 1/10 scale ???
It should work yeah as long as you make the wheel colliders appropriate to the scale.
What would be the ideal settings of a really high performance car with zero drifting?
well, im working on the suspension part, but for sideways friction of each of the wheels-
Extremum slip: 0.6
Extremum value: 3
Asymptote slip: 2
Asymptote value: 3
Stiffness: 1 for front wheels, 2 for rear wheels
these worked quite well for me when I tried to take corners at high speeds
Super Broo.....❤️
Keep going 🤗
Since you understand these physics so well, could you potentially try and create wheel physics using raycasts? (don't have to be complicated like Pacejka)
There's not many tutorials out there on the topic and I feel having someone explain it in the way you did this video would help so many developers not be reliant on the WheelColliders within Unity
Thank you so much! Couldn't find anything explaining wheel collider parameters anywhere and this is perfect!
I am really glad I helped mate 😊😊 stay tuned for more helpful videos!
Hola, encantado por tus explicaciones, pero si me puedes ayudar, necesito los valores del well collider para evitar el subviraje ya que a poca velocidad todo va bien pero al aumentar la velocidad me quedo sin dirección en las ruedas, atentamente Alfonso.
Lo que estas buscando, creo que es amentar la cantidad de friccion lateral que pueen experimentar tus ruedas delanteras, de todos modos, como bien ha comentado el chico, en el video, asegurate de que en casos asi, la curva de perdida friccion sea mas larga, en este caso puedes aumentar el asymptote value muy poco y alargar el asymptote slip mas, , alargalo hasta que el subviraje, que sufres vaya mas acorde con la velocidad que alcanza la rueda. ademas de que haga una caida menos abrupta. Suerte!
great job man, hope you get more subscribers!
Thanks man, appreciate it 😊
Can u help me? Can I change the variables of Friction by code (not in unity). I am working for my drift game.
Yeah definitely, you can change them this way
WheelFrictionCurve myWfc;
myWfc = _colliderRR.sidewaysFriction;
myWfc.extremumSlip = 0.1f;
_colliderRR.sidewaysFriction = myWfc;
@@nanousis IT WORK, IT WORK. Thank you, now I'm your subscriber!
Glad I could help 😊😊
Can you help me? Wheel colliders wont show for me, when I add them they are just invisible!
Oh nevermind I found out, also thank you for the tutorial!
Glad you managed to fix it ☺️
Hello, delighted by your explanations, but if you can help me, I need the values of the well collider to avoid understeer since at low speed everything goes well but when the speed increases I am left without direction in the wheels, sincerely Alfonso.
Unfortunately I didn't quite understand how wheel friction works. In your opinion what would be the most realistic configuration?
In the real world you would have forward friction to be higher in general than sideways friction.
Then the extremum slip should be lower than asymptote slip and the extremum value should be higher. Think of it like the value of traction before breaking traction is the extremum value. After you lose traction the traction value should be lower.
@@nanousis Thanks a lot, I'll try to do that here, if you can make a video creating the most realistic configuration possible it would help a lot, but anyway now I know where to start.
Hey So My Car Falls Side Ways While Turning How To Fix It?
I am a very beginner but still can say u need to do something with centre of gravity
It's probably center of gravity and too much grip. Also make sure your rigidbody mass is big enough.
@@nanousis Sir sir sir I wanna ask u something, actually I am from commerce background(accounts stuff u know) but wanna learn more more and more about game programming so if I learn physics and maths from a institute will it work for me ???
@@gabbargamer2007 hey yo you wanna make a car game with me? I have already made a huge progress but I'm now stuck at the traffic system and racing modes it's just I don't have much prior time so if you wanna join me in my game
Really good tutorial,shanks for it 👍👍👍
Glad I have helped 🙏
If I had to give credit to someone who actually taught me wheel colliders. It's you my guy. Also a small question
What if.. I had wheel colliders but also had mesh colliders of the wheels set on? (My engine kept crashing)
I am really happy the video helped you understand how whelp colliders worked 😊 as for the wheel colliders with a mesh collider it wouldn't really work since it would mean that two different colliders would collidide every frame. It would create some really strange behavior
Not sure where or not this would make sense to use for a less advanced vehicle like a wagon or chariot.
Thank you so much!
Jesus is coming back, God bless all!
Sir can you make a tutorial on adding gear box for car
It's a bit more complicated since you would have to simulate the whole engine for it to work. Maybe I'll do it in the future
Please make a tutorial on car steering wheel interior and exterior movement
Yeah, I can definitely try that, although I don't quite understand what you mean by exterior movement.
@@nanousis make a small vedio on interior car steering wheel rotation broo plzz....
I only wish I knew why the wheel colliders in Kerbal Space Program bounce your craft to death on Eve.
Great video!) You are the best!
Super happy you like the video 😊
@@nanousis You deserve it!)
Hiii bro
Which vedio are you going to realise
I'm working on a top-down shooter tutorial with first tutorial being movement. After that I'll probably come back to the racing game tutorial and either do an engine simulation( gears and sound) or do a lap system.
Hiii bro
Please make a tutorial on engine sound along with car gear system
I will try to put this on the schedule ^^
hi
i kinda need you help on a project i'm working on
:)
What's up?🙂
ahh thank you so much, its very helpfull,,
anyway sir, how to combine wheel collider with wheel object (mesh)?
i want to make a simple suspension for the vehicles in the game "unturned", because all the vehicles in unturned have a stiff and very strange suspension, between the wheels and the car body are rigid and very stiff, when the car passes something, instead of the tires the car moves up and down, the tires instead attached to the car body ... Unturned is an open source game so we don't need to worry about changing content, this game is very modable
edit: sorry for my bad grammars :)
I actually I'm not sure if it is implemented on my code but to do this you just need the wheel meshes to follow the position of the wheel colliders. So it should be as easy as a single line of code per wheel.
Sehr gut 👍🏻
Nice! I like this video!
Can you please send me your any contact i have some problems in my unity game so i need your help 🙏🏼
Thanx!!
😊
Great
are you greek?
Yeap
@@nanousis σε κατάλαβα από την φωνή... hehe. When i add the wheel colider in the car tire the colider in most likely bugged and not sync with the collider.
hi
Hey