Jump to content
  • Advertisement
Sign in to follow this  
k00k

Setup of the Camera on my Terrain

This topic is 4837 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 can I get the height of my terrain so that i can set the camera just a little bit over the top of it. I can manually do it when i start of course but once I move about my terrain there is nothing to keep the camera positioned just over the terrain thus making it not fall thru the ground. I would imagine I cant do anything with my terrain's width and height because those just tell me the size of the terrain ive setup and not the height from which i am from the ground. anyone have any tutorials on how to acomplish this i would apreciate. thanks.

Share this post


Link to post
Share on other sites
Advertisement
This has been discussed recently. I don't have time at the moment to dig up the relevant threads, but try googling for 'terrain height', 'bilinear interpolation', and 'barycentric coordinates'.

Share this post


Link to post
Share on other sites
thanks will do .. i tried looking thru the past 15 pages of threads and had not found anything about it so i figured I would just ask :)

Share this post


Link to post
Share on other sites
Yeah, it may be more than 15 pages ago. Also, it could have been in any of several forums, so without search the threads are probably pretty hard to find.

Actually, I just found one, here. It doesn't explain everything, but discusses how to find the triangle. If you know the triangle, one easy way to find the height is to simply intersect a vertical ray with the triangle plane.

'Hope that helps.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!