I’m designing a 3d game and am having trouble computing where the mouse pointer is actually pointing on the flat map when taking into account perspective which skews the view.
Let’s assume that the flat plane is part of the map, and the tilted plane is the viewport. Player’s camera is rotated arbitrarily but always pointing up, and has a defined position $C$. Cyan line crosses both $C$ and $O$, so cyan vector $\vec{d}=\overline{CO}$ is known.
Orange line is parallel to cyan line, and were all objects rotated and translated so that skewed surface becomes $z=0$ and $C$ becomes $(0, 0, 0)$, then the point of intersection $M$ between orange line and skewed surface would become $(x,y,0)$.
I know that, if the system was translated and rotated like so, the point I’m looking for would be somewhere on the line $\overline{CM}$ between $C$ and $M$, but can’t figure out exactly where.
How do I get the point of intersection between the flat surface and the orange vector?