Distance Joint 2D not working as described?

From the documentation here:

“Note that unlike the Spring Joint 2D, the Distance Joint is rigid and does not allow the distance between the objects to vary.”

However, in practice, it acts more like a string or rope, where the distance specified is a maximum, not an exact.

To replicate:

Add two Game Objects to the scene.

Give them each a Rigidbody 2D.

Set Gravity Scale to 0 on both.

Give one (or both) of them a Distance Join 2D with the other object as the target.

Run the scene and move around one of the objects (either in the inspector or through a script)

So either the documentation was wrong, this is a bug, or I’m missing something obvious.

Thoughts?

Yes, I think its the description you understand differently. with good reason imo.

look at the other one:
“The Spring Joint 2D component allows two Sprite objects controlled by rigidbody physics to be attached together as if by a spring. The spring will apply a force along its axis between the two objects, attempting to keep them a certain distance apart.”

http://docs.unity3d.com/Documentation/Components/class-SpringJoint2D.html

I’ve run into the same discrepancy between the description and actual behaviour of DistanceJoint2D. It’s behaving like what I’d expect from the slider joint.

My current workaround: use SpringJoint2D, set Frequency to 0. this keeps the joint objects at a fixed distance without any elasticity of the link.

Its still not working! If you trying to move main parent object distance become increase

In new version of Unity they added option 111158-spring.pngof Auto Configure Distance. that is the reason
Just Disable Auto Configure Distance in Spring Joint 2D component and its DONE111158-spring.png

,Just Disable Auto Configure Distance in Spring joint 2D and its DONE

111158-spring.png