Function to detect a point in a circle?

BlitzMax Forums/BlitzMax Beginners Area/Function to detect a point in a circle?

As per your second question, lets say you have vx and vy as the velocities of the rocket in the x and y directions. Then you have speed as the speed at which the rocket will travel. You can use the following code.

(x1,y1 and x2,y2 are the start/end points)
local dx = x1-x2
local dy = y1-y2
local mag# = sqr(dx^2+dy^2)
vx = dx*speed/mag
vy = dy*speed/mag