Urg... I'm so confused about btGeneric6DofConstraint...

SteveDeFacto
Posts: 31
Joined: Sat Jul 23, 2011 4:24 pm

Urg... I'm so confused about btGeneric6DofConstraint...

Post by SteveDeFacto »

I don't understand what the frames are. I tried this but it just makes a mess:

Code: Select all

btTransform frameInA, frameInB;
frameInA.setFromOpenGLMatrix((float*)&joint->obj[0]->getPose());
frameInB.setFromOpenGLMatrix((float*)&joint->obj[1]->getPose());
joint->joint = new btGeneric6DofConstraint( *joint->obj[0]->actor, *joint->obj[1]->actor, frameInA, frameInB, false );
scene->DynamicsWorld->addConstraint(joint->joint, true);
Basically that joints the two bodies together using both of their position and orientations for the frames. This completely disfigures my rag doll...
SteveDeFacto
Posts: 31
Joined: Sat Jul 23, 2011 4:24 pm

Re: Urg... I'm so confused about btGeneric6DofConstraint...

Post by SteveDeFacto »

I still can't figure out how the frames work. This is the closest I've come to getting them to work right:

Image

However, the characters face is not even remotely intended to look like that and the hands are also messed up... I set frameA to identity and for frameB I got the inverse of the difference from the first body matrix to the second.
SteveDeFacto
Posts: 31
Joined: Sat Jul 23, 2011 4:24 pm

Re: Urg... I'm so confused about btGeneric6DofConstraint...

Post by SteveDeFacto »

bump...