Okay, so I'm trying to find the algorithm of the separation axis theorem to work (for collision detection), and I need to find the minimum perpendicular vector between the point and the line. I do not ask for the minimum perpendicular distance (which I know how to find), but rather a vector that will have the same magnitude as this distance, and comes from an arbitrary point and a point on the line. I know the location of a point, a point on a line, and a unit vector indicating the direction of the line.
What I tried to do first found the minimum distance between a point and a line.
The next part is confusing, but I: 1) A vector is found between a point and a point on the line that I know 2) A vector is found between a point on the line and a point on the line plus a unit vector defining the direction of the line 3) Accepted the cross product of these two vectors (let's call this is a cross product A) 4) Accepted the cross product of the unit vector defining the direction of the line and the vector from the transverse product A (let's call it the transverse product B) 5) Normalized cross product B 6) Scaled transverse product B by m minimum distance
In any case, this whole attempt failed. Can someone tell me how should I find this vector?
user421215
source share