Sign in to follow this  

Simple collision detection

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

This topic is 3593 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this