Car dynamics

Hi there,

Just assembled my first demo with a car using Wheel Colliders:
http://www.cupisz.eu/robert/unity/CarTest2.html

I must admit it’s quite hard to get the controls feel just the way we need them for a game.

Why does the little sucker fly off into the air so easily? At first I thought it might be some scale/mass issue, but the car is approx. 2m high and with mass set to 2000, so that should be fine. I could of course set gravitational acceleration to some higher value, but then everything else would behave wrong. The car in Velociraptor Safari behaves similarly, but it’s actually not that much fun to float in the air all the time. Any suggestions on this one?

Another thing is limiting the maximal velocity of the car - what would be the best way to do that?

Thanks :slight_smile:

Agreed.

Getting the right feel is the most difficult part. I don’t know about the flying thing, just look at how slowly it falls. Something like air friction, if there is such a thing. Or maybe the code. It can do that.

Could you post your project as a .unitypackage for us to check out?

Sure, here it is.

SimpleCar.js shamelessly snatched from jkreijkamp http://forum.unity3d.com/viewtopic.php?p=84418

115933–4410–$cartest2_158.zip (14.9 MB)

Hi,

Yes, very difficult to tune…

Hope this helps you : Try to add a constant force to your “Simple Car” gameObject. Then set the “Force” and/or the “Relative Force” to negative values. :wink:

Yea, that might help. :slight_smile: I’ll try it out.

It’s not a very elegant solution, though… Any other ideas?

I would love to hear from ikiman, who did http://www.3dnemo.com/05_Buggy_Rise.html :slight_smile: