Sign in to follow this  

breaking up meshes for collision detection

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

This topic is 4732 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this