PDA

View Full Version : Getting correct coordinate



Ryo
07-09-2003, 03:41 PM
I am implementing the line draw function on my terrain engine using gluUnproject to get the coordinates of mouse position.
Values I am getting is almost correct, but z coordinates are always a little small, which causes most lines to go under the terrain.

I am guessing it comes from z buffer precision.
Is there anyway to avoid this.