Original Post
What I have so far: - The position of the camera's eye - A method of converting 2D input into a 3D point (OpenGL gluUnProject) (This seems to get a point just in front of the camera's eye) - Therefore, a vector can be created from the above two points (a line drawn representing this vector can be clearly seen to intersect with the map, but only when viewed from a different angle to that when the vector was created) - A height map (a uniform grid of heights) - A function that calculates the height at *any* point on the map What I would like to achieve: - To find the first intersection point of this vector on the map (there is the possibility of having more than one point) I have the idea of passing the x and y values of the vector to the height calculation function and comparing the result to the z value of the vector, scaling the (original) vector by a small amount if false and repeating. The problem with this is that the increment could "skip" over the first true value. Additionally, I could incorporate a range to the height check. Again, this has the possibility of producing an incorrect result. Is there a more accurate way of achieving this? Or should I attempt a completely different approach (in terms of input)? Thanks for any help with this