Im doing a tetris and when i try to glue two bodies using weldjoints, the connecting line is not rigid and the bodies bounce sometimes, what is a mystery to me is how with this code:
//create distance joint between b and c
var joint_def = new b2WeldJointDef();
joint_def.bodyA = b;
joint_def.bodyB = c;
//connect the centers - center in local coordinate - relative to body is 0,0
joint_def.localAnchorA = new b2Vec2(-0.5, -0.5);
joint_def.localAnchorB = new b2Vec2(0.5, 0.5);
//difference in angle of each body
joint_def.referenceAngle = 0 * Math.PI / 3;
//add the joint to the world
world.CreateJoint(joint_def);
working on this page: http://www.binarytides.com/weld-joint-box2d-javascript/
the guy manage to achieve what i want, ( i want something like those 2 boxes attached by a weldjoint).Of course i used the equivalent code and the weldjoint is not rigid as the one in the page. Im working using libgdx and box2d ( maybe a version or port problem?). Im trying weldjoints because i want to destroy the boxes one by one later. My actors are "mapped" to each body. It will allow me to destroy actors and let the ones in top fall naturally. Thx for your help :)