From 8bab40b49bde25f8261a01038f30898f4c64fbdf Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Mon, 25 Jan 2010 23:39:55 +0000 Subject: [PATCH] initialize inertia to zero --- .../Serialize/BulletWorldImporter/btBulletWorldImporter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.cpp b/Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.cpp index 1ec28cf41..e3bc82db1 100644 --- a/Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.cpp +++ b/Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.cpp @@ -285,6 +285,7 @@ btTypedConstraint* btBulletWorldImporter::createUniversalD6Constraint(class bt btRigidBody* btBulletWorldImporter::createRigidBody(bool isDynamic, btScalar mass, const btTransform& startTransform,btCollisionShape* shape) { btVector3 localInertia; + localInertia.setZero(0); if (mass) shape->calculateLocalInertia(mass,localInertia); @@ -345,4 +346,5 @@ btConvexHullShape* btBulletWorldImporter::createConvexHullShape() btCompoundShape* btBulletWorldImporter::createCompoundShape() { return 0; -} \ No newline at end of file +} +