I'm working on a game in unity and I've stumbled upon a physics problem that I don't really understand how to fix.
In this image, there are objects A and B. Let's just say they both have a mass of one.
As object A approaches object B, and the max distance has been breached, I want object B to attract quickly to object A's Min distance and then simply stay still (unless opposing outside forces choose to intervene).
This way when the object gets close enough to other objects it can affect, it will pick them up and bring them along on the journey.
Would this problem be solved if I used a simple rigid spring thats resting position is the min distance?
Or is there another better way for solving this problem like giving a force to both objects so that their equlilibrium would be met when the min distance is achieved.
So far what I've tried causes weird orbits and jitter.