Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6880865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:01:58+00:00 2026-05-27T05:01:58+00:00

Okay, I have some procedurally generated terrain (based loosely on http://www.swiftless.com/terraintuts.html ) Ive got

  • 0

Okay, I have some procedurally generated terrain (based loosely on http://www.swiftless.com/terraintuts.html)

Ive got a teapot “plane” which you can fly around in (third person camera)

Basically, the aim is to fly through the valleys etc… without crashing.

What I cant work out is how to calculate whether you have collided with the terrain or not?

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:01:59+00:00Added an answer on May 27, 2026 at 5:01 am

    A terrain map is particularly easy to test for collision against, since a terrain map is a map from a 2d point (x, y) to the height of the terrain, TERRAIN[x, y] at that point. Given your teapot plane at (t_x, t_y, t_z), just test its height against the height of the terrain at (t_x, t_y). That is, if t_z < TERRAIN[x, y], then you’ve crashed. You can test multiple points (perhaps the corners of a cube centered at the center of the teapot) against the terrain to give a more accurate result. Depending on the coarseness of your terrain map, you might pick a nearby grid-point, or interpolate linearly to compute the height of the terrain at an arbitary point.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

okay, so i have a text file with example content below line1with some random
Okay I have a series of objects based on a base class which are
Okay, this is really confusing me. I have some content inside of a div
Okay, I'm trying to be clear on this one... I have some insliding boxes,
currently I am working on a spring based application. I do have some unit
Okay so you have and array A[]... that is passed to you in some
Okay, so here's a problem I'm running into. I have some classes in my
Is it okay to have a full silverlight website? I've seen some website implements
Okay, I am using (PHP) file_get_contents to read some websites, these sites have only
Okay -- we have an interesting problem. Some background: Our main application uses Indy

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.