PDA

View Full Version : picking and z-value



12-14-2005, 08:50 AM
Hi,
I have draw 2 squares; one with z-value -1, other
0. I implemented picking. But when I pick on
overlapping area, hits number is 2. Why?
Red book seems to say that use different z-values
if right to obtain the selection of object not
closest (hits=1).....
Thanks

mikael_aronsson
12-15-2005, 12:52 AM
The Z value returned in picking is scaled a little different from what you use as a Z coordinate so you can not use the values as it is, if you have a peek at the OpenGL spec it explains how it works.

12-15-2005, 10:32 AM
gluUnPrject?

Thanks