RevoluteJoint does not preserve precise position

Hello,

I have a small problem. 😢 I am using Revolute joint that is connecting two polygons, unfortunately polygons
sometimes draw away each other and one of polygons reach unsuitable position. How can I assure, in order the
polygons were connected precisely ? - without udesirable retraction. Is is possible to use GearJoint ? or is there any other method ?

Thanks.
You could try:
- increasing the position/velocity iterations for the world step
- making the bodies more similar in mass
- do something about the reason the two bodies are being pulled apart in the first place
Dear Jerry,

I would like to tell you several important notes:

The sentence

"...do something about the reason the two bodies are being pulled apart in the first place... "

is the most important.

There are two useful commands:

JointList[0]->CollideConnected = false;
BodyList[0]->CollisionGroup = -1;

The reason why your ragdoll behaves somewhat suspiciously is that shapes with identical positions in 2D affects each other
by so called "irresistible force". Use CollisionGroup = -1; and check the behaviour.

Original thread: https://box2d.org/forum/viewtopic.php?t=9798