• ### What is your GameDev Story?

#### Archived

This topic is now archived and is closed to further replies.

# Terrain collision detection

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

## Recommended Posts

I''ve been looking into terrain collision detection but I have a few questions regarding the maths. I have been given the tip of checking the height of the heightmap against the collision point. If this point is below the height of the map at that position, then we have collision. Logical... The problem is this is very coarse. Especially if you have a smooth rendered map this will give problems, as I want a relative smooth detection (car on terrain simulation). I have been given the tip of interpolating the points that surround the collision point, but that''s where I''m lost. I cannot find the term "interpolation" so quick in my maths book. Although I have a vague idea of what interpolation is (averaging the heights), I would like to have an explanation, perhaps accompanied with a formula. Also would I like to know if this method is acceptable for detection that I was describing (car on terrain) and if there are things that I should look out for. Thank you!

##### Share on other sites
I''m not completely sure but I think interpolation is getting the inbetweens between points, a bit like tweening but for 3D.
There is linear interpolation and cubic interpolation, and a number of others I think.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 31
• 16
• 11
• 10
• 12
• ### Forum Statistics

• Total Topics
634115
• Total Posts
3015596
×