always update position, even for sleeping objects (is workaround, because sleeping objects never get their motionstate update), needs fixing for optimization

This commit is contained in:
ejcoumans
2007-02-14 04:02:14 +00:00
parent a5bf6a1254
commit 4d6ec84630

View File

@@ -139,7 +139,10 @@ void btDiscreteDynamicsWorld::synchronizeMotionStates()
btRigidBody* body = btRigidBody::upcast(colObj);
if (body && body->getMotionState() && !body->isStaticOrKinematicObject())
{
if (body->getActivationState() != ISLAND_SLEEPING)
//we need to call the update at least once, even for sleeping objects
//otherwise the 'graphics' transform never updates properly
//so todo: add 'dirty' flag
//if (body->getActivationState() != ISLAND_SLEEPING)
{
btTransform interpolatedTransform;
btTransformUtil::integrateTransform(body->getInterpolationWorldTransform(),