• Advertisement
Sign in to follow this  

Just a *bit* more accurate than bounding spheres?

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

Hey!

 

I'm not exactly proficient with 3D collisions. 2D is fine, but 3D volumes are, needess to say, quite a bit different. I've been reading around the interwebs on 3D collision, and all seem to say the same thing: "Using bounding spheres..." The thing is, for my experimental FPS, bounding spheres can be too inaccurate: Players could be frustrated when they die when a bullet whizzes just in front of their face, or a clear hit travels straight through their target without ever touching the bounding box. My question is, how can I get accurate collision detection without sacrificing speed or accuracy?

 

(An article would be great, too) mellow.png

Edited by MisterFuzzy

Share this post


Link to post
Share on other sites
Advertisement

Often you will use bounding spheres as the first level of detention, after your game detects that it is in the players sphere, it should then either use bounding boxes on each of the bones in your skeleton, and if one of the boxes is hit, from there check to see what polygon in that box if any was hit - It all depends on how accurate you need your detection to be.

Share this post


Link to post
Share on other sites

Aye, I've already been considering the "narrow it down" apporoach, I can detect which mesh in a model was hit to appropriately apply damage (A head shot would be an instant kill, whereas a shot to the toe should do little to no damage): But what I really would like is an article on collision detection of actual Models/volumes. I can't seem to find one that involves just the models without the bounding boxes or spheres. Thanks, though!

Share this post


Link to post
Share on other sites
Here:

http://www.realtimerendering.com/intersections.html

With your collision, you should start out as crude as possible, and keep working down. Sphere are used because it's a quick and cheap test to perform.

If the collision is outside the sphere, it couldn't possible collide with the object.

If the collision is inside the sphere, then you can do further checks.

This helps when you have lots of objects to test for collisions.

Share this post


Link to post
Share on other sites

Thanks, Daaark! That's exactly what I was looking for smile.png.

 

Yeah, I plan on having each mesh hold a collision sphere, and for each particular mesh collision (on a character or vehicle) the "weight" of damage to be applied will be determined by what mesh in a model was "hit." Of course, a shotgun to a car's bumper shouldn't stop it, but the engine? Not so much. A rocket would kill a vehicle if it hit anywhere :D.

 

From there, I plan on having an undrawn "collision model" that handles any per-vertex collision that is the same shape as the model, but is far less detailed. It will cover the general area, but with far fewer vertices. It will be subdivided into meshes, so I can handle the "weight of damage" I mentioned earlier.

Share this post


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

  • Advertisement