Replies: 1 comment
-
Thanks for the report. We probably should call setInterpolationWorldTransform when adding the body to the world. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
just spent my day fixing some border-line case bug, where my motion state transform was being set to identity/(0,0,0) during the step update.
This is what happens:
This will actually call btDiscreteDynamicsWorld::synchronizeSingleMotionState() for that body, and update the motionstate using the value returned by btRigidBody::getInterpolationWorldTransform().
However, since the simulation hasn't actually stepped, and because the rigid body has just been added, btRigidBody::getInterpolationWorldTransform() returns an identity transform, which override the transform stored in the motion state.
My workaround is to call both btRigidBody::setWorldTransform() & btRigidBody::setInterpolationWorldTransform() before adding the rigid body to the world. But that is definitively counter-intuitive.
I hope that makes sense. If not don't hesitate to get back to me.
Cheers
Greg
Beta Was this translation helpful? Give feedback.
All reactions