I'm working on a 3D perspective game and it would help if you could answer this:
Plane $P$ is defined as: $xf \cdot x + yf \cdot y + zf \cdot z + G = 0$
I know point $p$ $(xp, yp, zp)$ and point $f$ $(xf, yf, zf)$, and they each lie on plane $P$.
$xf, yf, zf, G, xp, yp, zp$ are all known.
I am looking for some point $q$'s coordinates. Point $q$ lies on plane $P$. Angle pqf forms a right angle.
*NOTE *: $f$ is at the same height as $q$ ($zq = zf$) and $p$ is above $q$.
I tried to use the dot product rule as well as the intersection of three planes in order to find point q, but it seemed there were too many unknown variables (which doesn't make sense to me).
Please help! Thanks.
You have three variables for the point $Q = (Q_x,Q_y,Q_z)$. You have that $\angle PQF$ is right angle hence $(P-Q) \cdot (F-Q) = 0$. Also you have that $Q_z = F_z$ and finally you have that $xf \cdot Q_x + yf \cdot Q_y + zf \cdot Q_z + G = 0$, as $Q$ lies on the plane. These three equation should give a solution (whenever possible) for $Q = (Q_x,Q_y,Q_z)$.