Jump to content
  • Advertisement
Sign in to follow this  
vidalsasoon

breaking up meshes for collision detection

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

I have a tank that i would like to move around a 3D terrain. each collidable object in my scene has a sphere surrounding it to easily know if they have a possibility of hitting. once the spheres are touching I would like to break my mesh into smaller BoundingSpheres or BoundingBoxes to refine my collision detection. how is the mesh broken down into smaller pieces?

Share this post


Link to post
Share on other sites
Advertisement
After you get the local collision detection with your sphere you could use MeshIntersect or MeshIntersectSubset to get accurate detection as to whether the mesh is hitting anything. This can be problematic if you're intersecting one mesh with another however since you can only cast rays. I use it mainly for bullet hit detection, but you could probably adapt it to your needs. Otherwise you can try and split it into smaller bounding spheres/boxes (perhaps one for each mesh subset?)and check those once it passes the larger box/sphere test.

Share this post


Link to post
Share on other sites
I'm definitely no expert, but I've heard that Mesh.Intersect() is not a good method to use for tracing bullets or collision detection.

And I have no idea why, it's just what I've heard;)

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!