i don’t really know if this is advanced but i don’t find a lot of info on my problem.
I have a scene with a movable camera. The thing i want to do is to determine, if you click with the mouse on the glwindow, where (@ wich coordinates (x,y,0)) the projection of that point on the xy-plane is.
So, for example, if i would draw a cube at this point, then the cube should move over the xy-plane following the mouse.
I have tried to calculate it out of my camera’s parameters but i don’t seem to get it right.
I can’t determine the direction of the projectionline from the mouse to the xy-plane because i don’t know the distance between the real viewpoint and the projectionwindow.
I’ve seen this working in a lot of modelling applications but don’t find any info on it.
anyone able to help?