I would like to create a solid joint, to make two objects work as one.
I tryed:
and:
Both kind of work, but not perfect. When strong forces are applied they move a bit.
Any advice to avoid this?
I tryed:
Code:
b2PrismaticJointDef jointDef;
b2Vec2 worldAxis(1.0f, 0.0f);
jointDef.Initialize(body1, body2, body1->GetWorldCenter(), worldAxis);
jointDef.lowerTranslation = 0.0f;
jointDef.upperTranslation = 0.0f;
jointDef.enableLimit = true;
b2Vec2 worldAxis(1.0f, 0.0f);
jointDef.Initialize(body1, body2, body1->GetWorldCenter(), worldAxis);
jointDef.lowerTranslation = 0.0f;
jointDef.upperTranslation = 0.0f;
jointDef.enableLimit = true;
and:
Code:
b2RevoluteJointDef jointDef;
jointDef.Initialize(body1, body2, body1->GetWorldCenter());
jointDef.lowerAngle = 0.0f;
jointDef.upperAngle = 0.0f;
jointDef.enableLimit = true;
jointDef.Initialize(body1, body2, body1->GetWorldCenter());
jointDef.lowerAngle = 0.0f;
jointDef.upperAngle = 0.0f;
jointDef.enableLimit = true;
Both kind of work, but not perfect. When strong forces are applied they move a bit.
Any advice to avoid this?