I know I am over thinking this which is why I am here.
I have a very simple program where I create a glRect(0,0,6,6), then rotate it about 80 degrees on the Y axis.
Then on MouseMove i use glUnProject()/glReadPixels() method to get the position on the plane and then draw it with another rect.
Here is an example of the output:
Mouse is hovering over the bottom right of the plane:
Mouse is hovering over the upper left of the plane:
Mouse is hovering over the upper right of the plane:
So, what I would like to get is WHERE that point is on the rect/plane. So if the rectangle was drawn glRectf(0,0,6,6) and the mouse is over the upper right (like the 3rd picture), then how would I take the point (returned by glUnproject()) and convert back it to ~(6,6)
Thanks in advance for any info you can give me on doing this.