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

Mesh itersection for collisions

Started by Tasaq Feb 25, 2012 at 1:06 PM 1 replies 1.4k views
Original Post
Tasaq
Tasaq
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
meeshoo
meeshoo
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: http://www.realtimerendering.com/intersections.html

Topic Locked

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

Sign in to reply to this topic.