If I understand it right, sleepVelocity will force freeze/sleep a rigidbody when its velocity is below the set value?
I created a gameobject->sphere, added a rigidbody to it and the script below. Then I bounce with a player controlled ball gainst it,with such high sleep value it should fall back to sleep right away no? Instead it very slowly comes to a stop.
function Awake()
{
rigidbody.sleepVelocity = 100;
rigidbody.sleepAngularVelocity = 100;
}
function Update()
{
print(rigidbody.velocity.magnitude);
}
I want my player controlled object to come to sleep if it is moving to slow, so it doesn't keep rolling forever on slightly uneven terrain but as the sleepvelocity value was not having any effect I was afraid adding a force of 0 also prevented the rigidbody to go to sleep. So I tried above above test setup with also no effect.
So do I understand the use of rigidbody.sleepVelocity wrong, am I doing something wrong or is it broken?