How do you bind a camera to a terrain (3D object)?

Started by
0 comments, last by Wudan 19 years, 1 month ago
How do you bind a camera to a terrain (3D object)? I have done some game development in the past however this is my first attempt at using DirectX and 3D objects (meshes). I can’t seem to figure out the concept of binding a camera to mesh or the terrain. I already have an app that loads 4 mesh object and I placed the camera on top of one of the meshes. I can set and navigate to the horizontal and vertical planes however finding the height plane eludes me. I have read a lot of information about interpolation, splines, and gray scale mapping and maybe I’m slow but I just can not seem to make the leap from those subjects to getting the height plane of a mesh or gray scale map. I am hoping that someone can give me any information that will push me in the right direction of what to read up on, a snippet of source code, some sage like advice, or any thing that will help me get rolling.
Advertisement
So ... you want the camera to be a set height above the terrain/mesh? I do the same thing, i am using ray-triangle collision testing to 'nudge' the camera in to a set position above the terrain, always exactly a specified distance from the mesh.

This topic is closed to new replies.

Advertisement