I've read tutorials on this, but I can't seem to get it to work. I don't think I understand what exactly is going on at all. What I'm trying to do is get the number of objects (and later the actual objects) that are intersected by a ray cast from the center of the screen. (Or where the mouse is)
Heres what I have to so far, and it's printing -1 always. glLoadIdentity();
glRotatef(pit, 1.0f, 0.0f, 0.0f);
glRotatef(yaw, 0.0f, 1.0f, 0.0f);
glTranslatef(-x, -y, -z);
Looking from that tutorial, I was able to convert the C code to Java. However, it returns things such as 0, NaN, or sometimes insane coordinates, even if the point is on top of a rendered polygon. Am I missing a step?
Looking from that tutorial, I was able to convert the C code to Java. However, it returns things such as 0, NaN, or sometimes insane coordinates, even if the point is on top of a rendered polygon. Am I missing a step?