From baf490a2b593f89f4469028082dabe784ed46889 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 22 Jun 2014 03:05:10 +0200 Subject: [PATCH] Change to btCylinderShape --- libs/openengine/bullet/physic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/openengine/bullet/physic.cpp b/libs/openengine/bullet/physic.cpp index d934639e0..31cb67a58 100644 --- a/libs/openengine/bullet/physic.cpp +++ b/libs/openengine/bullet/physic.cpp @@ -32,7 +32,8 @@ namespace Physic // Use capsule shape only if base is square (nonuniform scaling apparently doesn't work on it) if (std::abs(mHalfExtents.x-mHalfExtents.y)= mHalfExtents.x) { - mShape.reset(new btCapsuleShapeZ(mHalfExtents.x, mHalfExtents.z*2.f - mHalfExtents.x*2.f)); + // Could also be btCapsuleShapeZ, but the movement solver seems to have issues with it (jumping on slopes doesn't work) + mShape.reset(new btCylinderShapeZ(BtOgre::Convert::toBullet(mHalfExtents))); } else mShape.reset(new btBoxShape(BtOgre::Convert::toBullet(mHalfExtents)));