Assuming you want your sprite to move in a straight line, you would need to calculate the line between the two points and select a number of points on that line and move to them in each iteration.
Sounds simple doesn't it!
Or look as the line as a vector, (vx, vy), divide by, say 10, and add deltavx,vy to your sprite 10 times. And then make sure it doesn't go past mousex,y in the last iteration.
Something like that.
|