after picking in a multibody demo, allow sleeping for rigid bodies

This commit is contained in:
Erwin Coumans 2018-08-26 18:07:28 -07:00
parent 186ddb81d8
commit 72c48870b0
2 changed files with 7 additions and 1 deletions

View File

@ -478,6 +478,12 @@ struct CommonMultiBodyBase : public CommonExampleInterface
if (m_pickedConstraint)
{
m_dynamicsWorld->removeConstraint(m_pickedConstraint);
if (m_pickedBody)
{
m_pickedBody->forceActivationState(ACTIVE_TAG);
m_pickedBody->activate(true);
}
delete m_pickedConstraint;
m_pickedConstraint = 0;
m_pickedBody = 0;

View File

@ -2365,7 +2365,7 @@ void PhysicsServerCommandProcessor::createEmptyDynamicsWorld()
m_data->m_pairCache->setOverlapFilterCallback(m_data->m_broadphaseCollisionFilterCallback);
int maxProxies = 32768;
//int maxProxies = 32768;
//m_data->m_broadphase = new btSimpleBroadphase(maxProxies, m_data->m_pairCache);
btDbvtBroadphase* bv = new btDbvtBroadphase(m_data->m_pairCache);
bv->setVelocityPrediction(0);