Re-joining relative orbital position after being removed

HI all,

I have a basic solar system with planets orbiting a sun in circular paths. The planets can be clicked on and dragged away and out of position. When they are being held, their orbiting script is turned off. However, when released they snap back to the position they were grabbed at.

However, I would like to have them Slerp to their relative position (i.e. where they would be if undisturbed and continue to orbit as normal).

Any ideas on how to achieve this?

Thanks in advance.

Perhaps you could have a parent GameObject that performs the orbital rotation. You can unparent the planet when you start dragging it around, and have it move back to the parent when released. Finally, when the planet comes within a specific threshold distance of the parent GameObject, you could reparent and snap it back into the zero offset local position.