fixed 2 issues, one related to wrong 'safety' catch for large objects
and COLLADA constaints didn't recognize rigid body names
This commit is contained in:
@@ -704,7 +704,7 @@ void ColladaConverter::PreparePhysicsObject(struct btRigidBodyInput& input, bool
|
||||
|
||||
|
||||
btRigidBody* body= createRigidBody(isDynamics,mass,startTransform,colShape);
|
||||
if (body && body->m_userObjectPointer)
|
||||
if (body)
|
||||
{
|
||||
//bodyName is used as identifier for constraints
|
||||
body->m_userObjectPointer = (void*)input.m_bodyName;
|
||||
|
||||
@@ -503,7 +503,9 @@ void btDiscreteDynamicsWorld::updateAabbs()
|
||||
btPoint3 minAabb,maxAabb;
|
||||
colObj->m_collisionShape->getAabb(colObj->m_worldTransform, minAabb,maxAabb);
|
||||
btSimpleBroadphase* bp = (btSimpleBroadphase*)m_broadphasePairCache;
|
||||
if ( colObj->m_collisionShape->isInfinite() || ((maxAabb-minAabb).length2() < 1e12f))
|
||||
|
||||
//moving objects should be moderately sized, probably something wrong if not
|
||||
if ( colObj->isStaticObject() || ((maxAabb-minAabb).length2() < 1e12f))
|
||||
{
|
||||
bp->setAabb(body->m_broadphaseHandle,minAabb,maxAabb);
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user