I would like to make some sort of this simulation below, where user can interact with the white rod and drag it into the magnetic fields, which in resulting the blue line that represent the magnetic field of the permanent magnet to move in semi-circular motion.

I managed to get that kind of effect using animation

I wish I do not have to make an animation for it by manipulation path for the sphere to be automatically correcting it's own path after colliding with the round object since the sphere will suddenly moving faster than usual when colliding with much bigger round object.
I have tried using splines etc, but most tutorial I've seen are not editable in play mode, which is I cannot alter any of the curve values inside my script. So can anyone could provide me some insight or another better alternative than this? I've been stuck here for three days now.
Thanks!


RigidBodybut that would have weird results if you are setting itspositioninstead of applying forces. To be honest, I'm not very sure I understand the connection with the two pictures. Should the sphere loop indefinitely around the cylinder if it comes to close? \$\endgroup\$