Merge pull request #4444 from littlemine/patch-1

fix child transforms of a compound
This commit is contained in:
erwincoumans 2023-05-04 06:10:06 -07:00 committed by GitHub
commit 39b8de74df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ void CompoundBoxesExample::initPhysics()
#else
// recompute the shift to make sure the compound shape is re-aligned
for (int i = 0; i < compoundShape->getNumChildShapes(); i++)
compound2->addChildShape(compoundShape->getChildTransform(i) * principal.inverse(),
compound2->addChildShape(principal.inverse() * compoundShape->getChildTransform(i),
compoundShape->getChildShape(i));
#endif
delete compoundShape;