6dof constraint issue

Backup
Posts: 1
Joined: Wed Apr 04, 2012 2:27 pm

6dof constraint issue

Post by Backup »

Hi, i have a problem with 6dof constraints. I have couple of planks and i want to connect them with 6dof that acts like hinge. I want to make a suspension brige. The problem is that constraints start to twist as soon as they hit something. I've made a video of it (bridge is connected only on one side atm):
http://www.youtube.com/watch?v=t1X2rAz_Pek
Code - pos is absolute position of point where i want my constraint.

Code: Select all

btTransform ctWorldTransform;
ctWorldTransform.setIdentity();
ctWorldTransform.setOrigin(pos);
ctWorldTransform.setRotation(btQuaternion(0,0,0,1));
btTransform transformInA = rb1->getCenterOfMassTransform().inverse() * ctWorldTransform;
btTransform transformInB = rb2->getCenterOfMassTransform().inverse() * ctWorldTransform;
new btGeneric6DofConstraint(*rb1,*rb2,transformInA,transformInB,false);
Then i set all limits to zeros except lower limit for one axis - that should make that hinge-like functionality.

Any help is appreciated!