- Home /
Gravity change increases top speed
In my race game I use wheel colliders. First I made the game then I realised that my cars are four times bigger than they should be. Now that I did many things depending on the current cars so I cannot change their sizes. So I changed the gravity to suit. When I increase the gravity the cars top speed and acceleration increases very much. Which physically does not make sense unless the wheels are not slipping too much all the time. And the wheels are not slipping. A cars top speed is when its drag plus rolling resistance meets the force from the wheels (torque/radius). And gravity does not have any effect on either. Increased downforce cannot increase top speed. Does anybody have any idea how to fix this?
(Maybe I could not express myself above. The situation is against physics laws, it should not happen, a cars top speed does not increase with gravity, I believe its a kind of bug)
Answer by spinaljack · Jul 17, 2010 at 05:45 PM
What you're seeing is more traction caused by greater force on the wheel suspension. There's no "fix" because the unity physics model is based off 1 unit = 1 meter. Best you can do is lower the mass of the car and reduces the stiffness of the wheel friction
The 1 unit=1 meter is irrelevant, the problem is change of irrelevant properties with gravity. If I lower mass acceleration will increase even more and top speed will not be reduced much
Actually it does matter, huge objects will behave oddly
Answer by Yorick · Jul 17, 2010 at 05:44 PM
You could try to just add a upwards or downwards force to the car in FixedUpdate to offset the gravity change.
I did increase the gravity to make the cars behave more natural, if I add a force I will undo that.
I thought maybe gravity would influence the wheelcolliders in some way and a normal force might not. Just a thought.
Answer by Edy · Aug 17, 2010 at 07:56 AM
Try dividing the torque applied to the WheelColliders by the factor that increased the gravity. For instance, if your gravity is now 1.2g, try this:
Wheel.motorTorque = myPreviousTorque / 1.2;