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:
@@ -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 ();
|
||||
|
||||
Reference in New Issue
Block a user