Original Post
OK here is what i want to do. I have a (very simple) 3D engine that uses height maps to draw the terrain. im going to do my own physics and need to check if a collision has occured with the terrain, that isnt a problem. the easyest way to describe my problem will be to describe a picture to you. If you have a grid of 4x4 for simplicitys sake. then you draw 2 points on it anywhere on the grid (not nessiserily on the lines) Join the two dots up with a line And finaly shade the squares on the grid that contain any part of the line and that is what i want to find out, the shaded squares. the squares being terrain that i need to test, the line being a vector of movement of the object im trying to clip against the terrain. There is the brute force approach but that would be too wastefull can anyone help me?