mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 03:32:36 +00:00
The culprit was - surprise, surprise - d39d4f261983249b2dc540c072eed9768a3640f1
This commit is contained in:
parent
03aa270551
commit
91939c4687
@ -1,6 +1,6 @@
|
|||||||
#include "actor.hpp"
|
#include "actor.hpp"
|
||||||
|
|
||||||
#include <BulletCollision/CollisionShapes/btCylinderShape.h>
|
#include <BulletCollision/CollisionShapes/btCapsuleShape.h>
|
||||||
#include <BulletCollision/CollisionShapes/btBoxShape.h>
|
#include <BulletCollision/CollisionShapes/btBoxShape.h>
|
||||||
#include <BulletCollision/CollisionDispatch/btCollisionWorld.h>
|
#include <BulletCollision/CollisionDispatch/btCollisionWorld.h>
|
||||||
|
|
||||||
@ -31,8 +31,7 @@ Actor::Actor(const MWWorld::Ptr& ptr, osg::ref_ptr<const Resource::BulletShape>
|
|||||||
// Use capsule shape only if base is square (nonuniform scaling apparently doesn't work on it)
|
// 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()*0.05 && mHalfExtents.z() >= mHalfExtents.x())
|
if (std::abs(mHalfExtents.x()-mHalfExtents.y())<mHalfExtents.x()*0.05 && mHalfExtents.z() >= 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 btCapsuleShapeZ(mHalfExtents.x(), 2*mHalfExtents.z() - 2*mHalfExtents.x()));
|
||||||
mShape.reset(new btCylinderShapeZ(toBullet(mHalfExtents)));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
mShape.reset(new btBoxShape(toBullet(mHalfExtents)));
|
mShape.reset(new btBoxShape(toBullet(mHalfExtents)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user