Well I now have pixel perfect mouse input working using a opengl function call gluUnProject, which basically reverses the matrix (the algorithm for making everything 3D), and is able to translate the mouse's position on the screen, into a 3d position.
Now I did this twice once, close to the screen, once far from the screen, so I have two points. In order to get full ray casting to work with the mouse I need to get the angle in degrees.
So I'm in a bit of a need for help. Does anyone know how to get the angle of two points that are relevant to the world?
Meaning I have two points, and if you were to draw a line horizontally towards from one point to the other, and vertically for the other, the point of intersection would be the third point. Forming a right triangle. Here's a picture to help visualize what I mean.