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

  • @LemonMontage420
    @LemonMontage4203 жыл бұрын

    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

    @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

  • @RENOV
    @RENOV3 жыл бұрын

    I'm a bit late but the dream of making my game gets closer by the day. Thank you pablo

  • @pabloslab

    @pabloslab

    3 жыл бұрын

    you got it boy 👌

  • @pabloslab

    @pabloslab

    2 жыл бұрын

    he wats it to be perfect

  • @be15134

    @be15134

    Жыл бұрын

    @@pabloslab hey

  • @master.9202
    @master.92023 жыл бұрын

    Simple, well explained, fast and efficient. Only quality content. Thanks Pablo!!!

  • @CloakedPerv
    @CloakedPerv Жыл бұрын

    Thanks for the video Pablo! Very informative!

  • @stefanocasiglio4943
    @stefanocasiglio4943 Жыл бұрын

    this helped me so much, thank you a lot!

  • @vinyas0795
    @vinyas07953 жыл бұрын

    Was waiting for new video ✌🏻

  • @navdeeppadda5881
    @navdeeppadda58813 жыл бұрын

    I love his tutorials

  • @georginasmakjoska3129
    @georginasmakjoska31293 жыл бұрын

    Awesome!!

  • @someshsahu4638
    @someshsahu46383 жыл бұрын

    Nice video thankyou 🙏

  • @arazibrahim7416
    @arazibrahim74162 жыл бұрын

    Thanks Bro❤

  • @madhukamelan7014
    @madhukamelan7014 Жыл бұрын

    Best explanation ❤️

  • @fastbrothers7299
    @fastbrothers72992 жыл бұрын

    Thanks

  • @pranaydwivedi910
    @pranaydwivedi9103 жыл бұрын

    Why he is underrated

  • @navdeeppadda5881

    @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

  • @JasonMitchellofcompsci
    @JasonMitchellofcompsci Жыл бұрын

    Did you really just iterate over all wheels and then select the ones with an index less than 2. for(var i=0;i

  • @AbdullahQadeer1
    @AbdullahQadeer13 жыл бұрын

    great video. Move Camera Out of Car and make it lerp behind car and it wont vibrate.

  • @FocusGTOfficial
    @FocusGTOfficial3 жыл бұрын

    Your voice are Amazing ❤️🤩

  • @pabloslab

    @pabloslab

    3 жыл бұрын

    huh ...

  • @navdeeppadda5881
    @navdeeppadda58813 жыл бұрын

    yes 20 min

  • @gameplay_factory
    @gameplay_factory Жыл бұрын

    This solution is very linear so my suggestion would be using animation curve high torque on low speed low torque on high speed

  • @bibekgamebox1083
    @bibekgamebox10833 жыл бұрын

    who don't like to drive on water ??????

  • @dulguunchannel7609
    @dulguunchannel76093 жыл бұрын

    i got error cs 0270 how to fix?

  • @jaulloa21
    @jaulloa213 жыл бұрын

    Cool, I’m trying to emulate real car physics. mass * velocity.

  • @midpiano3067
    @midpiano30672 жыл бұрын

    dude how did you write the code wrong and it works without error ?

  • @artandmusic519

    @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.

  • @sfm_pakic3527
    @sfm_pakic35272 жыл бұрын

    i don't like that the camera just follow the car in all direction