Skip to content

Commit

Permalink
Fix 2 for older bullet versions (e.g. on Ubuntu Focal)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen committed May 31, 2024
1 parent 4e08d66 commit f59b78c
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,27 @@ struct TesseractCompoundLeafCallback : btDbvt::ICollide

if (TestAabbAgainstAabb2(aabbMin0, aabbMax0, aabbMin1, aabbMax1))
{
btTransform preTransform = childTrans;
#if BT_BULLET_VERSION >= 300
btTransform preTransform = childTrans;
if (this->m_compoundColObjWrap->m_preTransform != nullptr)
{
preTransform = preTransform * (*(this->m_compoundColObjWrap->m_preTransform));
}
#endif
btCollisionObjectWrapper compoundWrap(this->m_compoundColObjWrap,
childShape,
m_compoundColObjWrap->getCollisionObject(),
newChildWorldTrans,
preTransform,
-1,
index);
#else
btCollisionObjectWrapper compoundWrap(this->m_compoundColObjWrap,
childShape,
m_compoundColObjWrap->getCollisionObject(),
newChildWorldTrans,
-1,
index);
#endif

btCollisionAlgorithm* algo = nullptr;
bool allocatedAlgorithm = false;
Expand Down

0 comments on commit f59b78c

Please sign in to comment.