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:
@@ -273,6 +273,8 @@ void btCompoundShape::calculatePrincipalAxisTransform(btScalar* masses, btTransf
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void btCompoundShape::setLocalScaling(const btVector3& scaling)
|
void btCompoundShape::setLocalScaling(const btVector3& scaling)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -283,7 +285,7 @@ void btCompoundShape::setLocalScaling(const btVector3& scaling)
|
|||||||
// childScale = childScale * (childTrans.getBasis() * scaling);
|
// childScale = childScale * (childTrans.getBasis() * scaling);
|
||||||
childScale = childScale * scaling / m_localScaling;
|
childScale = childScale * scaling / m_localScaling;
|
||||||
m_children[i].m_childShape->setLocalScaling(childScale);
|
m_children[i].m_childShape->setLocalScaling(childScale);
|
||||||
childTrans.setOrigin((childTrans.getOrigin())*scaling);
|
childTrans.setOrigin((childTrans.getOrigin()) * scaling / m_localScaling);
|
||||||
updateChildTransform(i, childTrans,false);
|
updateChildTransform(i, childTrans,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user