We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f9bc769 + f83a09b commit bca843fCopy full SHA for bca843f
apps/openmw/mwphysics/actor.cpp
@@ -63,8 +63,11 @@ namespace MWPhysics
63
}
64
65
const btVector3 halfExtents = Misc::Convert::toBullet(mOriginalHalfExtents);
66
- if ((mMeshTranslation.x() == 0.0 && mMeshTranslation.y() == 0.0)
67
- && std::fabs(mOriginalHalfExtents.x() - mOriginalHalfExtents.y()) < 2.2)
+ float extRatio = 0.f;
+ if (mOriginalHalfExtents.y() != 0.f)
68
+ extRatio = mOriginalHalfExtents.x() / mOriginalHalfExtents.y();
69
+
70
+ if (mMeshTranslation.x() == 0.0 && mMeshTranslation.y() == 0.0 && extRatio >= 1.f / 1.1f && extRatio <= 1.1f)
71
{
72
switch (collisionShapeType)
73
0 commit comments