2 replies to this topic
#1 Members - Reputation: 107
Posted 25 February 2012 - 07:06 AM
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
Ad:
#2 Members - Reputation: 221
Posted 26 February 2012 - 03:36 PM
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.realtimer...ersections.html
Here are some good resources too: http://www.realtimer...ersections.html



















