fixed base should set activation state to 'ISLAND_SLEEPING'

This commit is contained in:
erwin coumans 2021-04-22 20:20:08 -07:00
parent 184b7816d0
commit 46ea89a284

View File

@ -137,7 +137,14 @@ void btMultiBodyDynamicsWorld::updateActivationState(btScalar timeStep)
btMultiBodyLinkCollider* col = body->getBaseCollider();
if (col && col->getActivationState() == ACTIVE_TAG)
{
col->setActivationState(WANTS_DEACTIVATION);
if (body->hasFixedBase())
{
col->setActivationState(ISLAND_SLEEPING);
} else
{
col->setActivationState(WANTS_DEACTIVATION);
}
col->setDeactivationTime(0.f);
}
for (int b = 0; b < body->getNumLinks(); b++)