View Single Post
  #3   (View Single Post)  
Old 17th April 2012
teig teig is offline
Port Guard
 
Join Date: May 2008
Posts: 20
Default

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.
Reply With Quote