Rigidbody Sleeping

Hi, I’ve a series of rigidbodies stacked on top each other in a column. When they come to rest on top of each other, I was hoping that they’d go to ‘sleep’ as they’re velocity is less than the sleep velocity. However, according to the documentation if there is a collision with another rigidbody this will automatically wake them up, even if that rigidbody is also stationary. I’m assuming this is happening in my case, as the rigidbodies have a velocity of 0,0,0 yet they won’t go to sleep.

Can anyone suggest a way around this? I was initially going to try and remove their rigidbody component at runtime, but this doesn’t seem possible. Essentially what I want is the rigidbodies to act under gravity and collide with each other, and then when they have settled, lose their physics behaviour.

Thanks!

Have you tried tweaking the settings in the Physics Manager ?

You will specifically want to look at tweaking the Sleep Velocity, Sleep Angular Velocity and the Bounce Threshold to get the effect you want.

Just ran into the same issue as the original poster. Thanks for the answers!

Apart from changing the physics manager option I think you can manually send them to sleep with rigidbody.Sleep

Bad thing is you might (not sure about it) have to wake them up manually with rigidbody.WakeUp

Why not setting your RigidBody as beeing Kinematic so that it is not affected by collision but will still affect others so that you can stack your other rigidbodies. For information Unity scripting reference is at: link text