Ok I've honestly forgotten this since high school, and I can't find a good example on wikipedia or anywhere. What I want to do, is have a point (the player), which will be projected onto a 1-dimensional plane of a line between 2 points. So when I run the editor, I have 3 different locations on a cartesian grid, and I want to project the 3rd to where it would meet the other 2 on a line, at a 90 degree adjacent to it. Pretty much this picture:
I've been remaking my gravity engine as an open sourcer, and this is dead vital. I need the center of gravity for longer objects to always be directly beneath the player's feet as you walk down it. This is very very simple to do on a simple vertical or horizontal axis (set X = constant, Y = Yplayer, etc), but proving difficult for oddly angled objects.
If I got this down, I could create platforms you could walk across at ANY angle, with proper physics.
its not just tgf. in computing x increases as it goes left to right y increases as it goes top to bottom.
i have so many math books and i remember this problem as well. don't really wanna dig for the answer
thats good only if he knows 4 coordinates. 2 on each line equation. he only has 3 and he wants the perpendicular line that goes through his third coordinate, and intersects the line that goes through the first 2. im working it out right now so all the equations are in terms of the three coordinates. (x1, y1) (x2, y2) (x3, y3). itll give you the x and y of the unknown intersection point. hold on a second.