Remove first argument from btMultiSphereShape, calculate local inertia approximation from aabb.

If user wants more accurate inertia tensor for multi-sphere shape, use btCompoundShape instead 
(amd btCompoundShape::calculatePrincipalAxisTransform)

Thanks rcharlton for bringing this up.
Erwin
This commit is contained in:
erwin.coumans
2009-06-11 13:51:48 +00:00
parent 6c80353556
commit f552a1dbbf
4 changed files with 17 additions and 35 deletions

View File

@@ -33,7 +33,7 @@ void DynamicCharacterController::setup (btScalar height, btScalar width, btScala
m_halfHeight = height/btScalar(2.0);
m_shape = new btMultiSphereShape (btVector3(width/btScalar(2.0), height/btScalar(2.0), width/btScalar(2.0)), &spherePositions[0], &sphereRadii[0], 2);
m_shape = new btMultiSphereShape (&spherePositions[0], &sphereRadii[0], 2);
btTransform startTransform;
startTransform.setIdentity ();