   Camera Height Using Heightmap
  Hello all. I have created a simple terrain engine that loads the terrain from a heightmap. I was woundering whether i should do collision like this. I would create a function in my terrain class called GetHeight. That would return the current height from my heightmap to where my camera is positioned. I would then use that value+1.0f for my cameras y position. Is this an ok way to do this or is there an other more optimized way to get collision with my terrain. Thanks for reading and im looking forward to hearing your replies.   
  That's pretty much it. One problem you'll get is that the camera's height will appear to 'step' between the different heights as you move. You could make the movement smooth by interpolating between the positions over a few frames.Another more accurate method is to use the vertices of the triangle under the camera as parameters of the plane equation, and use that to find the exact point on the triangle that is below your camera.   