Fix for btCapsuleShape, m_localScaling is already applied to the radius/halfExtents so don't apply it again in the localGetSupportVertex(NonVirtual)

Make sure SerializeDemo compiles fine without DESERIALIZE_SOFT_BODIES defined
This commit is contained in:
erwin.coumans
2011-12-14 11:18:11 +00:00
parent dacb24e968
commit 3035ee69c4
3 changed files with 24 additions and 16 deletions

View File

@@ -244,7 +244,7 @@ btVector3 btConvexShape::localGetSupportVertexWithoutMarginNonVirtual (const btV
pos[capsuleUpAxis] = halfHeight;
//vtx = pos +vec*(radius);
vtx = pos +vec*capsuleShape->getLocalScalingNV()*(radius) - vec * capsuleShape->getMarginNV();
vtx = pos +vec*(radius) - vec * capsuleShape->getMarginNV();
newDot = vec.dot(vtx);
@@ -259,7 +259,7 @@ btVector3 btConvexShape::localGetSupportVertexWithoutMarginNonVirtual (const btV
pos[capsuleUpAxis] = -halfHeight;
//vtx = pos +vec*(radius);
vtx = pos +vec*capsuleShape->getLocalScalingNV()*(radius) - vec * capsuleShape->getMarginNV();
vtx = pos +vec*(radius) - vec * capsuleShape->getMarginNV();
newDot = vec.dot(vtx);
if (newDot > maxDot)
{