- Home /
RigidBody doesn't sleep with gravity turned on.
To save CPU, rigidbody would go to sleep when velocity and angural velocity become low. However, I find that rigidbody won't go sleep if the feild "use gravity" is on. Even if the rigidbody has stopped on the floor.
How can I solve this problem?
I guess Unity does that so it can detect changes in the forces on the object. I reckon you'd need to code your own solution, but how you'd do that without using the same CPU time you'd otherwise save, I really don't know.
@guangheng you must post comments as CO$$anonymous$$$$anonymous$$ENTS, not answers. thanks
Answer by robhuhn · Sep 04, 2013 at 01:05 PM
I had a question about collider penetration a few month ago where I get the tip that a small "Min Penetration for Penalty Force" and/or a high iteration count will prevent the bodies from sleeping. May be that will also help you: http://answers.unity3d.com/questions/399064/prevent-collider-intersection.html
Thanks, it works! Previously, I set it to 0, so the objects vibrate all the time, and won't sleep at all.
Your answer
Follow this Question
Related Questions
Go to sleep. 0 Answers
How do I change force of gravity for a single object? 4 Answers
Rigidbody--Addforce on a Spherical Platform(A Globe) 2 Answers
RigidBodys Suddenly Heavier 1 Answer