Moving An image

Blitz3D Forums/Blitz3D Programming/Moving An image

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You will need to find the angle between the both of them. Once you have this, you can do :

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 :)