You might think that this is one of those "glide to x position of mouse pointer and x position of mouse pointer". but no! It's actually pretty complicated! Look inside to see!
Me... again...