Archived

This topic is now archived and is closed to further replies.

Accessing Specific Parts of Meshes

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

In my Direct3D program, I''m working on collision detection. So far I have it working using the Mesh.Intersect function to test to see if a ray intersects a mesh. It works fine now because the mesh I am testing collision with is very simple, only a few polygons. Eventually I want to add more complicated meshes and then create a simple "collision mesh" within the same .X file to use to test collisions. I was wondering how I could take a mesh and only render the detailed part of it, and only test the collision with the simple collision mesh. Any ideas or information on how I can do this? I''m using C# and Managed DirectX 9.

Share this post


Link to post
Share on other sites
As far as I know, there''s no way to do what you''re asking.

Usually the way you test for collisions is by using some kind of bounding volume instead of the actual mesh. For example, you place a box or a sphere around all your meshes. Then to test for collision between two meshes, you just have to check for collision between two boxes or two spheres.

If you want more precise collision detection (like hitting an arm versus hitting a leg on a character model) then you need to model your mesh as a hierarchy of frames. Each node in the hierarchy has it''s own bounding volume.

Hope this helps,
neneboricua

Share this post


Link to post
Share on other sites