You will need to find the angle between the both of them. Once you have this, you can do :
To get the angle, you need the two points. Start point (x1,y1) and end point (x2,y2). Then:
I'm at college the now so i can't write up a demo, but the above will work :)
image_x = image_x + cos(angle) image_y = image_y + sin(angle)
To get the angle, you need the two points. Start point (x1,y1) and end point (x2,y2). Then:
angle = ATan2( y2 - y1, x2 - x1 )
I'm at college the now so i can't write up a demo, but the above will work :)