- Home /
Wheel collider physics - something I'm missing?
I am setting up vehicles to drive round a course using waypoints. Each waypoint has a speed associated with it that the vehicle reads and then works out the acceleration/deceleration needed to pass through the waypoint at that speed. I am using the standard equation (v^2 = u^2 + 2as) and all the maths works out fine, pulling in the rigidbody mass and using the current distance etc, etc. to work out the torque to apply.
Here's the problem: acceleration works fine but when I want to decelerate, everything goes wrong. Example: I want to bring the car to rest at the next waypoint. which is about 35 metres away but when I apply the brakeTorque, it stops in less than a metre. The torque value is absolutely correct when I work it out by hand, and I am dividing it by 4 to apply it to all 4 wheels evenly.
When I disregard the manual and use negative motorTorque instead (same calculations) it works fine, and it also drives much more smoothly the rest of the time, such as when the brakes are applied to correct for an over-speed condition.
Is there something about the physics engine I am not understanding? How is brakeTorque meant to be used on a wheel collider?
Your answer
Follow this Question
Related Questions
My space bar refuses to work 1 Answer
trouble making a fast projectile 2 Answers
Why are these object passing through each other? 1 Answer
How do I completely turn off/avoid using the physics engine? 2 Answers
Add velocity relative to ground? 1 Answer