If we're just intersecting lines with rectangles, trig isn't even necessary here.
Just use good ol' slope and intercepts:


http://www.delphiforfun.org/Programs/Math_Topics/intersecting_lines.htm

A little simple if/then logic can figure out which edge of the rect you want to intersect with on each button. Take the imaginary line between the centers of the objects, and intersect it with the edge being crossed. All you need are the two locs of the objects, and the two corners of each edge you want to point to.

function intersect line1, line2
...
end intersect

HTH
Brian

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to