Jump to content
  • Advertisement
Sign in to follow this  
sf3rdechelon

collision detection w/ .X models

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

Hi all, I'm pretty new to DirectX, and was hoping someone could point me towards a nice demo/tutorial that covers collision detection against a .X model? Thanks

Share this post


Link to post
Share on other sites
Advertisement
For any kind of model you would most likely use an axis-aligned bounding box and test it against other models (and their bounding boxes) as well as testing it against the world (in whichever format you use)

http://www.gamasutra.com/features/20000203/lander_01.htm

http://www.toymaker.info/Games/html/collisions.html

http://www.flipcode.com/articles/dpcolumn_issue05.shtml

http://www.3dkingdoms.com/weekly/weekly.php?a=3

http://www.harveycartel.org/metanet/tutorials/tutorialA.html

http://www.devmaster.net/articles/quake3collision/

check those out,

Share this post


Link to post
Share on other sites
Thanks, but for what I'm looking to do, I think I need to test every triangle or at least every poly or surface. I'm not certain of the intricacies of the X format and was hoping a good demo/tutorial could help me better understand how to navigate through an X model using the utils libraries that Microsoft provides.

I’m considering using X models for buildings and larger vehicles, so I’d actually be standing inside a model and need to know when I hit a wall or an opening to another room or even to exit/enter the building.


Share this post


Link to post
Share on other sites
Just to let you know triangle collision detetion is expensive and what you do have to do is to make a make your own collision solution where you test bounding box first and then make the triangle test if that passes.

But there's lots of free Collision SDKs that work triangles, for example
Tokamak has a static triangle mesh object that you can use.

Here's the tutorial on how to make a terrain mesh for Tokamak
http://www.adamdawes.com/programming/tokamak/04_TerrainMesh.html



You can get vertex and index data from a X-file, using LockIndexBuffer and use the terrain mesh solution above.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!