PDA

View Full Version : Little problem with gluUnProject



jirkamelich
12-28-2002, 09:54 AM
I finally got gluUnProject working, it works great, but there is yet a little problem about it. I calculate 3d position of place where i clicked, but when i move camera the position changes.
I get the modelview matrix and stuff right after moving camera(glTranslatef and glRotatef) and calculate the position just when i click.

mikael_aronsson
12-28-2002, 12:13 PM
Hi !

I am not sure what the problem is, yes it does change when you change the camera, but that's expected, I mean you change the view when you move the camera.

What you do need to look out for is the usual problem with unproject/project, the Z value is tricky to get it right.

Mikael