|
-
Senior Member
nearest line
Let's say you dynamically draw 50 lines on the stage.
I'd like to know how to check which of these lines is the nearest to a certain point (e.g. the mousepointer). And ofcourse I'd like to know the fastest way.
I'm starting to understand it, but I need a little help to really get it.
What I understand is that the point on a linesegment closest to a certain point is the intersectionpoint of the perpendicular line between the "certain point" and the line.
But I can't think of an easy way to calculate this.
Anyone?
Thanks in advance!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|