How to set rigid body put to sleep ?

openmaya
Posts: 1
Joined: Tue May 04, 2010 9:25 am

How to set rigid body put to sleep ?

Post by openmaya »

Code: Select all

if ( sleep == true )
{
   if ( frame == 1 )				
       body->forceActivationState( ISLAND_SLEEPING );  

   if ( frame > 50 )
        body->setActivationState( ACTIVE_TAG );
					
}
when i play first, it's right..
but when i playback some times, the special body have been moved... why?
means the special body moving when the frame < 50 ,
how to set special body put to sleep ?

please.....