Jump to content
  • Advertisement
Sign in to follow this  
zurekx

Simple collision detection

This topic is 3843 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 was thinking about implementing simple collision detection in my engine. One technique I've been thinking about (havent really read about it anywhere, that's why Im questioning the efficiency), is to divide the world into sectors with an octree and then just check if the line that the player moves along intersects any of the triangles in the cubes containing the line. Is this efficient enough? What are the best methods for line-triangle intersection?

Share this post


Link to post
Share on other sites
Advertisement
The approach you describe is definitely a reasonable first pass at collision detection. Note that tracing a line through the octree is only accurate if your moving entity is a point, if it is anything bigger the object will penetrate the triangles.

Approaches for line/triangle intersection are described at the site Vampyre_Dark linked to, and are discussed on these forums quite a bit too.

Good luck!

Share this post


Link to post
Share on other sites
Sign in to follow this  

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