diff options
author | Xinlei Wang <wxlwxl1993@zju.edu.cn> | 2023-04-11 22:21:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 22:21:21 +0800 |
commit | d9a4a7e703111b1909ce9e6900473048f1ba56e6 (patch) | |
tree | c2c53a2a1539e6d602db58f4bb8271e3298ab1cb | |
parent | 0e59474e1cf1fd69e3ca512826cfbe15cd6a9cec (diff) | |
download | bullet3-d9a4a7e703111b1909ce9e6900473048f1ba56e6.tar.gz |
fix child transforms of a compound
-rw-r--r-- | examples/ExtendedTutorials/CompoundBoxes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/ExtendedTutorials/CompoundBoxes.cpp b/examples/ExtendedTutorials/CompoundBoxes.cpp index 89ddefb80..c9768e6be 100644 --- a/examples/ExtendedTutorials/CompoundBoxes.cpp +++ b/examples/ExtendedTutorials/CompoundBoxes.cpp @@ -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; |