Hi there,

I’m doing a project using the perspective projection. I’ve a camera located at (20, 20, 20) looking at (0, 0, 0).

When I try to get the coordinates in the nearest plane using gluUnproject(mouseX, height - mouseY, 0, …) I get (someX, someY, 19.5).

The question is why I get in Z some slightly difference? I was expecting to get 20 in Z because it must be the nearest plane.

Can someone explain me why I get such difference?

Thanks.