- Home /
can't slow my car down
my car is using four wheel colliders and I'm accelerating it by adding a force to the rigidbody, the problem is i want it to drift to a gradual stop but it doesn't slow down at all.
I've tried modifying the forward friction of the wheel but it doesn't seem to help.
I have a feeling this is a regular thing and i'm just forgetting something in my process of creating my car, but can anyone help me figure it out?
A simple method would just to be to apply an opposing force to the car when it's not being pushed.
But I'm guessing you want a more realistic approach. How are you attaching your wheels to the car?
Answer by Tim.Holman · Sep 08, 2011 at 03:30 PM
Have you tried adjusting the settings on the rigid body itself? Perhaps if you crank up the drag and/or angular drag you'll get the desired results.
well i had put drag on it and it seemed to slow down pretty well, but it had two problems, the car wouldn't rotate after i went off a jump, and it doesn't take into account the ground types the ground is actually on.
if this is the best way though i could probably force it to work.
Answer by Sydan · Sep 08, 2011 at 03:43 PM
Try using a physics raycast to detect if the ground is present under the car. If it is: Increase all forms of drag. If it is NOT: Reduce all forms of drag.
k I'll use the wheel hit information to average out the friction information on the drive wheels, that might do the trick and should save on the extra raycast.
If you manage to make that work it will be better than my suggestion! As the number of wheels in contact will then affect the drive handling of the car :)