I'm having this problem in the free edition of Unity 4.1 where rigidbodies aren't falling asleep (and yes, I've tried playing with the
sleepAngularVelocity values!). I've read the docs at http://docs.unity3d.com/Documentation/Components/RigidbodySleeping.html but cannot figure out the problem.
Here is a screenshot demonstrating my problem: Rigidbody Sleep Diagram http://uberlethal.com/random/rigidbody_sleeping.png
I wrote a script that is attached to the rigidbodies in question, which sets the material color to red if the rigidbody is currently asleep or green if it is awake. The screenshot was taken when all objects were at rest. As you can see, not all of the gameobjects are sleeping. Each piece of debris you see on screen is its own gameobject with a rigidbody and collider.
The Unity docs I linked to above state the following:
Rigidbodies automatically wake up when:
- another rigidbody collides with the sleeping rigidbody
- when adding forces.
Perhaps some clarification on the above might help solve this issue: If two rigidbodies are touching when they fall to "rest", will they never stay asleep? Put another way, would they just keep interrupting each other's sleep? As for the "adding forces" part, do sleeping rigidbodies awake only when forces are added directly to them, or when any force is added to any object (this is important because I am using a rigidbody character controller which moves via
I have tried manually sleeping objects myself with undesired results. What usually happens when I do this is that some objects will remain suspended in the air.
Let me know if you need other details - I have tried a great deal of things.