Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

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 read couple articels about collisions and terrain but there is nothing about terrain making in 3D program I can't see boundingBox being used for terrain collision there must be something like Every Single trinangle collision tell me if i wrong and give me some tips

share|improve this question

It depends on what kind of terrain you have. Normally, terrain is stored as a grid of height values, which eliminates the possibility of having caves, overhangs, or vertical cliffs. This terrain is usually stored as a height map, which is an image that contains the height data, instead of as a model. Collision detection on a heightmap is usually done by calculating the height (Y) at a certain position (XZ) using interpolation and comparing that to the height of an object or point.

If your terrain is just another model, you'll have to decompose it into a series of convex hulls and use a 3D collision algorithm like Minkowski subtraction or the separating-axis theorem, exactly the same way you would handle any other 3D collisions. For simpler games with only basic collision detection needs, I'm sure you can get away with raycasting, which is a relatively simple operation, to check for collisions in a given direction.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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