Animation play along mouse draging?

Hello,how can i make animation play forward or backward with mouse dragging?
I need this for my reloading mag part.

Thanks

The animations frame ‘position’ can be controlled (sort of) by sampling it

Say your animation is 1 second (conveniant)
when the mouse is eg. halfway along the drag, you set time to 0.5f and sample it.
Now you just need to determine what % of the way along the drag is
At the start of the drag, it should be 0, at the end its 1
There’s a number of ways to do this, I’d probably go for an inverse Vector3 lerp, with the start and end drag targets, and the closest point of the mouse position projected on the line between them (GO MATHS)