Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have loaded a .RAW file into a 2x2 array in my class. The way I am rendering it works fine but I am struggling to get the camera to move on top of the terrain. The terrain renders from 0,0,0 (x,y,z) as that is where I put my camera. My camera class allows to the "camera" to move through the scene.

I want to be able to "walk" on top of the terrain with some basic collision detection (if possible). Any tips on where to go for this or any tips?

share|improve this question

closed as too broad by MichaelT, GrandmasterB, Ixrec Dec 4 '15 at 7:50

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

4  
the Game Dev SE site might be able to provide you with some good links. You could ask the moderators to migrate this question there: gamedev.stackexchange.com – FrustratedWithFormsDesigner May 7 '12 at 15:54

If one assumes that (0, 1, 0) is the vector that poins to the sky, a collision occurs, when the terrains height at the cameras X and Z coordinates is greater or equal to the Y coordinate of the camera. The next thing is, the camera needs gravity to stick at the ground.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.