JustInvoke / Randomation-Vehicle-Physics

Vehicle physics system for the Unity engine.
https://justinvoke.com/game-assets/#randomation-vehicle-physics
864 stars 184 forks source link

Vehicle on last gear accelerates as fast as first gear. #39

Closed johnnycage10 closed 5 years ago

johnnycage10 commented 5 years ago

Hello, First, thank you for this project! It's absolutely amazing.

My only issue I've got so far and am not sure how to solve is : If a vehicle starts on its last gear (6th gear for example), the vehicle will accelerate as fast as if the vehicle was on 1st gear.

Making shifting up and down meaningless as it just limits the RPM but maybe not the torque?

I was expecting that the car accelerates very slowly in 6th gear, then the more you downshift, the more acceleration the car gets until it reaches a certain RPM ?

I was wondering if it is a change that has to be done in DriveForce.cs but I am really unsure how to do that properly hence why I'm reporting this here hoping for any help!

Thank you so much!

JustInvoke commented 5 years ago

You probably want to adjust the torque curve of the engine. Try lowering the leftmost key on the curve so that the torque is reduced at low RPMs, but make sure it still curves upward fairly quickly. This way if you start in 6th gear, the car will accelerate much more slowly since low speed will correlate to lower RPMs and lower torque based on the curve. Remember that the x-axis of the curve is the RPM of the engine *0.001 and the y-axis is the torque.

johnnycage10 commented 5 years ago

And that was it, I'm an idiot. My torque curve was inverse linear... Thank you so much for the super fast answer, very sorry to have bothered you for this very stupid mistake I've done!

JustInvoke commented 5 years ago

It's no problem, we all make simple mistakes sometimes.