I’ve made the simplest chain of ConfigurableJoints. All the RigidBodies, colliders and ConfigurableJoints are identical. When I add a drive to make the chain stiffer, like a spring, the deformation is not smooth and it seems like one joint out of two is bending in the wrong direction.
I’ve tried with all objects as siblings, and as a hierarchy, it made no difference (as it should).
I also tried to change the number of solver iterations from 6 to 200 and it doesn’t change the general behavior. I also tried to push it with a non-kinematic RigidBody (instead of the cube in the gif) with no difference.
There is nothing fancy, no custom script, just capsules, RigidBodies and ConfigurableJoints
Why is the solver not able to produce a smooth deformation along the joint chain? why is one joint out of two seems to be going in the wrong direction?
Try the other solver if you haven’t already. It’s supposed to be better with joints. Change it in the physics preferences.
Also try lowering the fixed timestep.
Try disabling pre-processing.
And finally, try projection angle and distance.
edit - Also, if you are moving that box with the mouse, it may not give the best representation of what is happening. Use a rigidbody with forces to collide with your joint setup.
Thank you for your advice. The temporal GS solver type produce a very different result, with the chain being bent only on one or two joints, with the other joints staying straight. There is no bending in the wrong direction. So it is even less smooth, but in a way also less buggy. Not the solution, though.
Greater and lower timestep affect the speed and the stable pose, but not the general bugged behavior.
Disabling pre-processing moves joints a bit, but does not change the general behavior.
Projection distance and angle, after enabling them, changed the precision but not the general behavior.
Also, I understand that applying force from a kinematic, perfectly world-aligned, mouse-driven cube is wrong in many ways but the bug is initially detected in a normal physic environnement, with complexe physic objects pushing on other ones. This is a simplified showcase made to reproduce the bug in the simplest situation.
Even with a single sphere collider on each body, they are still forming pairs. One joint is bending out of two, while the other is staying straight, and even bending slightly in the wrong direction.
That shouldn’t have any effect here. That rule applies to objects that are directly linked with joints. In this case even a box collider alone without rigidbody would cause the same effect.
I’ve tried reducing the weight linearly. The stiffness change along the chain accordingly, but the pairs of joint are still clearly visible.
In the real game, the effect is noticeable when the chain is pushed by other objects with similar masses, and also when it is pushed on a wall with no RigidBodies.