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/Ketsji | |
parent | 76918e6f90b18c68d83c67ee29dfbc1187a021ae (diff) |
BGE patch #22623 applied: new bound type: Capsule.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConvertPhysicsObject.h | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h index 879bcd472c6..ca20aa6b618 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h @@ -53,7 +53,8 @@ typedef enum { KX_BOUNDCONE, KX_BOUNDMESH, KX_BOUNDPOLYTOPE, - KX_BOUND_DYN_MESH + KX_BOUND_DYN_MESH, + KX_BOUNDCAPSULE } KX_BoundBoxClass; struct KX_BoxBounds @@ -168,4 +169,3 @@ bool KX_ReInstanceBulletShapeFromMesh(KX_GameObject *gameobj, KX_GameObject *fro #endif #endif //KX_CONVERTPHYSICSOBJECTS - diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index 44ae032179b..d889c6386cd 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -184,6 +184,14 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, bm = shapeInfo->CreateBulletShape(ci.m_margin); break; } + case KX_BOUNDCAPSULE: + { + shapeInfo->m_radius = objprop->m_boundobject.c.m_radius; + shapeInfo->m_height = objprop->m_boundobject.c.m_height; + shapeInfo->m_shapeType = PHY_SHAPE_CAPSULE; + bm = shapeInfo->CreateBulletShape(ci.m_margin); + break; + } case KX_BOUNDMESH: { // mesh shapes can be shared, check first if we already have a shape on that mesh @@ -553,4 +561,4 @@ bool KX_ReInstanceBulletShapeFromMesh(KX_GameObject *gameobj, KX_GameObject *fro spc->ReplaceControllerShape(bm); return true; } -#endif +#endif
\ No newline at end of file |