braketorque making rigidbody sleep
Whenever i set my wheelcollider's braketorque to something other than zero it makes my rigidbody sleeps after a while.
My object is not moving, just standind still in a terrain. After like 3s the rigidbody attatched becomes asleep ( wheelcollider.attachedRigidbody.IsSleeping() is equal true), so if i move the terrain the object doesnt fall or goes up with it.
Is that behaviour the correct one?
Answer by VitorPM · Apr 10, 2016 at 12:07 AM
Add a simple scene with a simple car.
Create a script with
void Start() { foreach(WheelCollider c in m_wheelColliders) c.braketorque = 5f; }
void Update() { print(m_wheelCollider[0].attachedRigidbody.IsSleeping()); }
Let it fall over the terrain, and watch the print goes from false to true. Then move the terrain downwards and check out your rigidbody standing still!
Your answer
Follow this Question
Related Questions
WheelCollider: Car on boat. Car is pushing boat. CAUSE: WheelCollider (Suspension?) 0 Answers
Wheel colliders are not sticking to Ground 0 Answers
Move rigidbody cube without it tumbling 2 Answers
Rigidbody.velocity Movement code produce wildly different gravity interactions 0 Answers
Physics for ball on an incline: rolling up a hill if half way up 1 Answer