How do I fake a tethered object?

I’m trying to create the idea of a tethered sphere. I have a simple scene with 3 spheres in a box (floor plane and four surrounding wall planes). One sphere is the Player and has a rigidbody component attached. The other two spheres are “tethered” to their positions, but in a way that allows them to “move out of the way” or give-way when the player collides with them, after which they ease back into their initial/target position.

I’m not good enough with physics, to know how to set this up. Does anyone have some pseudo-code for the process or steps for the script?

Here’s what I’m currently testing, and it seems to be doing nothing; though I suspect I’ve got conflicting forces happening here.

    protected void Update() {

        //increment timer once per frame
        currentLerpTime += Time.deltaTime;
        if (currentLerpTime > lerpTime) {
            currentLerpTime = lerpTime;
        }

        //lerp back into position!
        float perc = currentLerpTime / lerpTime;
        transform.position = Vector3.Lerp(startPos, endPos, perc);
    }

   void OnTriggerEnter(Collider other) {
       Debug.Log ("Trigger some movement!!");

      _thrust = 20f;
      _rb.AddForce(0,0, _thrust, ForceMode.Impulse);
 }

I would say look into the different joint components. Perhaps a spring or a hinge joint may serve your purpose.

Excellent, thanks Brathnann, the spring joint works flawlessly. OMG I’m so excited!!

You could, if you want to cheat expensive physics, also just measure the distance between the two objects each frame and if it goes past a threshold apply a force towards one another that scale up the further away it is.