fix one of the btCompoundShape scaling issues, this fix breaks the API (need to add warning at the next release)

fixes https://code.google.com/p/bullet/issues/detail?id=374 and
https://code.google.com/p/bullet/issues/detail?id=444
This commit is contained in:
erwin.coumans
2013-09-10 23:34:23 +00:00
parent 7195b54d13
commit bb379bd84c

View File

@@ -273,6 +273,8 @@ void btCompoundShape::calculatePrincipalAxisTransform(btScalar* masses, btTransf
void btCompoundShape::setLocalScaling(const btVector3& scaling)
{
@@ -283,7 +285,7 @@ void btCompoundShape::setLocalScaling(const btVector3& scaling)
// childScale = childScale * (childTrans.getBasis() * scaling);
childScale = childScale * scaling / m_localScaling;
m_children[i].m_childShape->setLocalScaling(childScale);
childTrans.setOrigin((childTrans.getOrigin())*scaling);
childTrans.setOrigin((childTrans.getOrigin()) * scaling / m_localScaling);
updateChildTransform(i, childTrans,false);
}