Car physics in unity 3D(uphill traction)
Follow me on Twitter : / notsnacky
Support me on Patreon : / donpablo
Packages:
essential assetes I use : drive.google.com/file/d/1qDu1...
Check out these vieos:
Fps series : • UNITY FPS GAME
Racing series : • How to make a Racing v...
RPG series : • RPG In Unity
Пікірлер: 30
The reason for it being "5 times less" is because you're not accounting for your gear ratio and final drive. wheelcollider.motorTorque should be the FINAL result after getting the engine torque (what you're assuming wheelcollider.motortorque to be), multiplying it by the current gear ratio (example, 1st is 4.2, 2nd is 3.4, reverse is -4, neutral is 0, etc.), and then multiplying that by the final drive of the differential (example, 3.6). So to recap, it should be the desiredMotorTorque * gearRatio * finalDrive = wheelcollider.motorTorque. Would love to see this comment pinned in order to stray others away from the (5 times less) confusion, because stating it that way makes it seem like unity is calculating motor torque incorrectly, when it is indeed infact correct. But I do agree that wheelcollider.motorTorque should be renamed to something like wheelcollider.wheelTorque. EDIT: thanks for pinning my comment Pablo!
@pabloslab
3 жыл бұрын
i couldn't agree more my man , that's very well put . That's the reason why in my personal project, where i have a gearing system, cars with 100 torques can move much better. Respect
I'm a bit late but the dream of making my game gets closer by the day. Thank you pablo
@pabloslab
3 жыл бұрын
you got it boy 👌
@pabloslab
2 жыл бұрын
he wats it to be perfect
@be15134
Жыл бұрын
@@pabloslab hey
Simple, well explained, fast and efficient. Only quality content. Thanks Pablo!!!
Thanks for the video Pablo! Very informative!
this helped me so much, thank you a lot!
Was waiting for new video ✌🏻
I love his tutorials
Awesome!!
Nice video thankyou 🙏
Thanks Bro❤
Best explanation ❤️
Thanks
Why he is underrated
@navdeeppadda5881
3 жыл бұрын
Ikr people who just play games have so many subs but people like him who put so much effort to make one get very few subs
Did you really just iterate over all wheels and then select the ones with an index less than 2. for(var i=0;i
great video. Move Camera Out of Car and make it lerp behind car and it wont vibrate.
Your voice are Amazing ❤️🤩
@pabloslab
3 жыл бұрын
huh ...
yes 20 min
This solution is very linear so my suggestion would be using animation curve high torque on low speed low torque on high speed
who don't like to drive on water ??????
i got error cs 0270 how to fix?
Cool, I’m trying to emulate real car physics. mass * velocity.
dude how did you write the code wrong and it works without error ?
@artandmusic519
5 ай бұрын
yeah I have the same issue here - we cannot access the massCentre through the rigidbody - which is the error it's throwing on my end.
i don't like that the camera just follow the car in all direction