- Home /
WheelCollider: veering/drifting bug?
I know there have been a bunch of questions related to this but I've not yet found a satisfactory answer. Apologies if you're sick of hearing about this!
I've created a super simple 'car'. With four gameobjects with wheelcolliders positioned precisely symmetrically around the body (which has a rigid body attached). The car is placed on a simple plane. If i make the car 'go' by adding motortorque to the back wheels, the car will veer to one side quite dramatically as it travels.
Is this somehow expected behaviour or a bug? If it's expected, why is it happening?
Answer by bitbutter · Jan 29, 2014 at 03:59 PM
The reason for the drifting seems to be some kind of bug related to fixed timestep. The drifting can be removed by reducing the timestep, see animated gif below for a before and after.
Sorry for inconvenience, if you change fixed timestep 0.02 to 0.000005, you make more update in per seconds. 0.02 -> 50 call updates, 0.000005 -> 200000 call updates. it's not good on mobile phone
Answer by POLYGAMe · Feb 22, 2014 at 03:37 AM
Try adjusting the angular drag. With a bit of messing about you can get rid of the drift. Also, make sure all your wheels have the same mass and make sure wheels and car body masses are realistic amounts.
i'm adjusting 4 wheel, they are same (mass, foward friction, sideway friction, radius), same position Y, and symmetric position X. Add same torque. But car still go to left side. It's can't go straight. Can you help me with example number in wheelcollider to make car go straight.
Hi there, I know this is an old question, but I have same problem here. Did you solved this issue? Change timeStep didn't work for me... Thanks
Your answer
Follow this Question
Related Questions
Character Controller Pushes Car With Wheel Colliders? 0 Answers
Simulating wheels without a wheel collider? 1 Answer
Cloth disappears (occludes?) in scene view when zoomed in too far. Is there a fix? 2 Answers
Null attachedRigidbody of a WheelCollider 0 Answers
Make locomotive Pull Carriage 0 Answers