diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2010-08-29 00:56:54 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2010-08-29 00:56:54 +0400 |
commit | ad70072009179fc888572ebc0625a44634052cfe (patch) | |
tree | 22f1ca0e57d8a39159bde6a46c5d6512caceab5c /source/gameengine/Physics | |
parent | 76918e6f90b18c68d83c67ee29dfbc1187a021ae (diff) |
BGE patch #22623 applied: new bound type: Capsule.
Diffstat (limited to 'source/gameengine/Physics')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsController.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/Physics/common/PHY_DynamicTypes.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp index fd1a62d8997..421a9fc64b8 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp @@ -2027,6 +2027,11 @@ btCollisionShape* CcdShapeConstructionInfo::CreateBulletShape(btScalar margin, b collisionShape->setMargin(margin); break; + case PHY_SHAPE_CAPSULE: + collisionShape = new btCapsuleShapeZ(m_radius, m_height); + collisionShape->setMargin(margin); + break; + case PHY_SHAPE_MESH: // Let's use the latest btScaledBvhTriangleMeshShape: it allows true sharing of // triangle mesh information between duplicates => drastic performance increase when @@ -2162,4 +2167,3 @@ CcdShapeConstructionInfo::~CcdShapeConstructionInfo() } } - diff --git a/source/gameengine/Physics/common/PHY_DynamicTypes.h b/source/gameengine/Physics/common/PHY_DynamicTypes.h index 08d94a2850a..cc0f06a58cf 100644 --- a/source/gameengine/Physics/common/PHY_DynamicTypes.h +++ b/source/gameengine/Physics/common/PHY_DynamicTypes.h @@ -138,6 +138,7 @@ typedef enum PHY_ShapeType { PHY_SHAPE_SPHERE, PHY_SHAPE_CYLINDER, PHY_SHAPE_CONE, + PHY_SHAPE_CAPSULE, PHY_SHAPE_MESH, PHY_SHAPE_POLYTOPE, PHY_SHAPE_COMPOUND, @@ -148,4 +149,3 @@ typedef enum PHY_ShapeType { typedef float PHY_Vector3[3]; #endif //__PHY_DYNAMIC_TYPES - |