This is kind of what I mean; a string like object moves with two objects, and increases in width dynamically depending on the objects positions. I dont need the code, just to know if it exists and where to find it.
If we’re talking a 2d line, in the Editor you’d use things like Gizmos.DrawLine, or Handles.DrawLine.
In Runtime there’s the Line Renderer component.
And is it physically interactable?
Oh, you mean like rope physics. There’s a million and one tutorials out there for it. I believe it involves stuff like hinge joints.
You need to be clearer and more specific on what you mean if you want a useful answer. Physics or the visuals? Both?
If you mean using 2D physics then yes, you can use the DistanceJoint2D to constrain two Rigidbody2D to be a certain distance apart with a configurable stiffness but that only applies if you want the joint to constrain two Rigidbody2D. It doesn’t understand constraining arbitrary GameObject that you modify the position of via the Transform.
As above, you can use the LineRenderer for visuals.
I’d say you need to decide on what “moves” these GameObject. If it’s you and not physics then physics won’t be involved and you’re then just talking about visuals via a LineRenderer.