Original Post
Hi there! I thought that this topic was rather well documented but after half an hour of googlin' I ended up here ;-) The problem: I'm working on some kind of editor. The view is done rthe following way: there's one point for the camera's pos, and one for it's focus. Then I use "gluLookAt(pos, focus)" to render the scene. So the camera is simpley positioned at POS and looks straight to FOCUS. Now when the user clicks on the screen (giving me coords fom (0,0) to (1024,768)) I want to calculate the corresponding ray (from the cam's pos through my scene). The next thing I need is simply the intersection point between the ray and the "normal" plane (y=0, just extending along the X/Z axis). But this is rather easy once I got the ry (I guess) ;-) So what troubles me right now is how to get the ray. It's starting point is the camera's position, right? But how do I get it's direction? I guess I'll somehow have to take the viewing matrices (how do I get those?) and do some crazy math with them... Can you help me out? Thanks!!!