initialize inertia to zero

This commit is contained in:
erwin.coumans
2010-01-25 23:39:55 +00:00
parent 362a0faf0f
commit 8bab40b49b

View File

@@ -285,6 +285,7 @@ btTypedConstraint* btBulletWorldImporter::createUniversalD6Constraint(class bt
btRigidBody* btBulletWorldImporter::createRigidBody(bool isDynamic, btScalar mass, const btTransform& startTransform,btCollisionShape* shape) btRigidBody* btBulletWorldImporter::createRigidBody(bool isDynamic, btScalar mass, const btTransform& startTransform,btCollisionShape* shape)
{ {
btVector3 localInertia; btVector3 localInertia;
localInertia.setZero(0);
if (mass) if (mass)
shape->calculateLocalInertia(mass,localInertia); shape->calculateLocalInertia(mass,localInertia);
@@ -346,3 +347,4 @@ btCompoundShape* btBulletWorldImporter::createCompoundShape()
{ {
return 0; return 0;
} }