From 91939c4687da020d9c24ad723c680bcd2b72cea3 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 6 Feb 2017 05:39:56 +0100 Subject: [PATCH] Switch actors to capsule shapes now that the jumping bug is gone (Fixes #2116, Fixes #2909) The culprit was - surprise, surprise - d39d4f261983249b2dc540c072eed9768a3640f1 --- apps/openmw/mwphysics/actor.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwphysics/actor.cpp b/apps/openmw/mwphysics/actor.cpp index 91c4f799ab..5167f6ef0e 100644 --- a/apps/openmw/mwphysics/actor.cpp +++ b/apps/openmw/mwphysics/actor.cpp @@ -1,6 +1,6 @@ #include "actor.hpp" -#include +#include #include #include @@ -31,8 +31,7 @@ Actor::Actor(const MWWorld::Ptr& ptr, osg::ref_ptr // 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()) { - // Could also be btCapsuleShapeZ, but the movement solver seems to have issues with it (jumping on slopes doesn't work) - mShape.reset(new btCylinderShapeZ(toBullet(mHalfExtents))); + mShape.reset(new btCapsuleShapeZ(mHalfExtents.x(), 2*mHalfExtents.z() - 2*mHalfExtents.x())); } else mShape.reset(new btBoxShape(toBullet(mHalfExtents)));