brDefaultMotionState::getWorldTransform was wrong, in case of a non-identity centerOfMassOffset.
Thanks to Mathias for the report/fix.
This commit is contained in:
@@ -25,7 +25,7 @@ ATTRIBUTE_ALIGNED16(struct) btDefaultMotionState : public btMotionState
|
|||||||
///synchronizes world transform from user to physics
|
///synchronizes world transform from user to physics
|
||||||
virtual void getWorldTransform(btTransform& centerOfMassWorldTrans ) const
|
virtual void getWorldTransform(btTransform& centerOfMassWorldTrans ) const
|
||||||
{
|
{
|
||||||
centerOfMassWorldTrans = m_centerOfMassOffset.inverse() * m_graphicsWorldTrans ;
|
centerOfMassWorldTrans = m_graphicsWorldTrans * m_centerOfMassOffset.inverse() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
///synchronizes world transform from physics to user
|
///synchronizes world transform from physics to user
|
||||||
|
|||||||
Reference in New Issue
Block a user