Jump to content
  • Advertisement
Sign in to follow this  
Drunlar

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

This topic is 4821 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!