Jump to content
  • Advertisement


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


Simple collision detection between 2 mesh?

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

If you only want to test IF they collide, then you need to do:

1) [preprocess] Build a bounding volume to approximate the mesh. The more specific your bounding volume, the more specific your collision detection gets. Simplest would be a sphere, more complex would be an OBB tree several layers deep. If you want triangle to triangle collision, you''ll need to generate the triangles of your mesh (they are not part of the .x file format, if that''s what you''re using)

2) [runtime] Check the bounding volumes of the meshes against each other. If you want triangle to triangle collision, then you''ll probably need to be using OBB trees, check the collision between them and check triangle collision from colliding leaf nodes.

The simplest way is to use bounding spheres and not care about tri-tri collision, but this is not very accurate for both collision detection and collision response. The more complex is to use OBB and deal with tri-tri collisions, which gives the most accurate results for both detection and response.

Check out the Collision Detection Demo on my website at http://gamestudies.cdis.org/~segall . It''s pretty much what you''re asking for. But keep in mind it''s around 2 months old, and I have since made several improvements (including collision response), but it should give you a good idea.

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!