I'm found error in btConeTwistConstraint constructor which attach body to the world frame:
Code: Select all
btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,const btTransform& rbAFrame)
:btTypedConstraint(CONETWIST_CONSTRAINT_TYPE,rbA),m_rbAFrame(rbAFrame),
m_angularOnly(false)
{
// m_rbBFrame = m_rbAFrame; // original code
m_rbBFrame = m_rbAFrame * rbA.getCenterOfMassTransform(); // my fix