Jump to content
  • Advertisement

Archived

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

Coz

Which Technique for collision detection with terrain?

This topic is 5655 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

I would like how you detect collision detection with a terrain and some other mesh like a human body, and why you do it that way. I can use a bounding sphere as a first test with the object mesh and then subdivide to make it accurate but what should I do about the terrain? Test against each triangle inside the bounding sphere? As usual any comment of any kind, except flames that don't help are apreciated ;D [edited by - Coz on March 30, 2003 9:35:45 PM]

Share this post


Link to post
Share on other sites
Advertisement
I just use the heightmap to figure out the height of the terrain at that particular point. For spaces between vertices, I simply interpolate. If an object was on one side the previous frame and is somehow on the other side the next frame, a collision is assumed to have occured.

Share this post


Link to post
Share on other sites
But what if I don''t use a heightmap? also, the terrain is not big; the biggest extension I would ever need would be about the size of the hyrule field in Zelda OOT.

---------------------->
Nothing in the world is the way it should be; that''s why we, the champions, exist and live for: HOPE.

Share this post


Link to post
Share on other sites
The simplest way is certainly to test each face against your collision volume. Use some sort of hierarchy (octree, quadtree etc.) to cut down the number of triangles tested.

Share this post


Link to post
Share on other sites
Thanks ;D
Now that I think abou it I might have put this in the Math and Physics forum, even tought I'm using OpenGL because I tought that the answer would have some thing to do with it... and now that I think about that also, why would it have something to do with it?

---------------------->
Nothing in the world is the way it should be; that's why we, the champions, exist and live for: HOPE.

[edited by - Coz on April 1, 2003 12:57:53 PM]

Share this post


Link to post
Share on other sites

  • 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!