Skip to main content
GameDev.net gamedev.net
🔒 Locked

Collision detection for billiards simulation

Started by johncmurphy Oct 1, 2009 at 6:20 AM 1 replies 1.3k views
Original Post
johncmurphy
johncmurphy
What is the "best" collision detection method for a billiards simulation? Assume 16 spheres of identical size in a rectangular field with infrequent collisions. I am thinking that one of the tree methods would be best, but I am not sure. Thank you.
fingerprint211b
fingerprint211b
I'm not sure what you asked, so I'm just gonna go ahead and assume.
Collision detection is not a problem, a correct response is. Here, this article should contain all you need for your game about detecting collisions :
http://www.gamasutra.com/view/feature/3383/simple_intersection_tests_for_games.php

Hope you find it helpful.
johncmurphy
johncmurphy
Based on that link, it seems like a sweep and prune method would work well. It would get rid of the whole problem created by used a grid overlay (quadtree, k-d tree, etc.) when a ball overlaps a couple of grid spaces. Instead, using bounding spheres and a sweep and prune method, I could quickly scan for any potential collisions before going ahead with more in-depth collision detection.
Thanks, I'll give it a try.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.