Added btCapsuleShape. This could already be simulated by simply adding 2 spheres to the btMultiSphereShape, but this was bad documented/unknown.

For tapered capsules, you can still use btMultiSphereShape, just pass 2 spheres with different radius.
This commit is contained in:
ejcoumans
2007-01-30 00:09:08 +00:00
parent 7b5301bb43
commit 581468ceec
7 changed files with 275 additions and 36 deletions

View File

@@ -91,6 +91,7 @@ btCollisionShape* shapePtr[numShapes] =
#endif
new btCylinderShape (btVector3(CUBE_HALF_EXTENTS-gCollisionMargin,CUBE_HALF_EXTENTS-gCollisionMargin,CUBE_HALF_EXTENTS-gCollisionMargin)),
//new btCapsuleShape(0.5*CUBE_HALF_EXTENTS-gCollisionMargin,CUBE_HALF_EXTENTS-gCollisionMargin),
//new btCylinderShape (btVector3(1-gCollisionMargin,CUBE_HALF_EXTENTS-gCollisionMargin,1-gCollisionMargin)),
//new btBoxShape (btVector3(CUBE_HALF_EXTENTS,CUBE_HALF_EXTENTS,CUBE_HALF_EXTENTS)),
//new btConeShape(CUBE_HALF_EXTENTS-gCollisionMargin,2.f*CUBE_HALF_EXTENTS-gCollisionMargin),