Hi.

The picture shows a point and a line in a 2d space. Does someone know what algorythm do I use to calculate the '?' in the picture? It is the distance between the 'point' and the line, but the angle between the line and the "distance line" has to be 90 degrees. I want to use that in my physics engine. And can someone help me find the 3D equivalent of that as well?

Thanks in advance!