Sign in to follow this  
Tasaq

Mesh itersection for collisions

Recommended Posts

I switched from openGL to XNA and i think it is really awesome, but i stuck on collision detection. I know that I can use built in BoundingSphere or BoundingBox ( I am not sure but i think it's OBB). But since I want to play with car games (not necessary extremely physicaly correct) i want to have better collision detection. In openGL I did collision with terain by modification of class that reads model from .3ds, but there I assumed that I will have perfect "chessboard" from top view, i divided the squares until i find the one with my model, find which triangle to test and then get height from plane equation :) It worked like a charm, but here I don't have a cluee how to reimplement it with xna classes :( And I would like to go step further and do better collision detection :) How can I get the triangle data from Model class? Or maybe someone knows how (i don't need the code, only basic idea, I catch on quickly :) ) or where I can find mesh volume collision explanation (like with proxy model)? :) Thank You in advance :)

Share this post


Link to post
Share on other sites
If you want to go for better collision detection than a box or sphere approximation would offer, usually you have to go with a hierarchical system. First you have your boxes or sphere, and that would allow to test objects fast. If two such approximations intersect, then you should have a simpler mesh resembling the mesh your draw that you can use for more accurate collisions.

Here are some good resources too: [url="http://www.realtimerendering.com/intersections.html"]http://www.realtimerendering.com/intersections.html[/url]

Share this post


Link to post
Share on other sites

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