   Why do games use hitboxes?
  I am wondering why games use hitboxes such as hl2,tf2,ccs etc, whats wrong with testing against the faces of the mesh if the direction of the bullets hit it...   
  10 people firing automatic shotguns at the same time.   ;  what do you mean?   ;  You need to use simplifed meshes for collision detection, because using the full meshes is too time consuming if there are lots of interactions going on.;  Ok , i think i see why nowthis is pritty interesting to watchdoes anyone know how they get the boxes to render like so when the leg moves the boxes moves etc, it seems complex   ;Quote:Original post by Anddoswhat do you mean?It's often a good idea to aim for a fairly even framerate, and stuff like testing a lot of rays against triangles takes a lot of time. The problem with shooting in particular is that a lot of shots can happen at the same time, causing a noticable hickup in the framerate if they take a long time to compute.That being said, of course it's possible to do accurate ray testing of bullets, but many will believe it's not worth the tradeoff.   ;  In games where you can use a variety of player models but the model is purely aesthetic (ie, it doesn't affect your stats) using hitboxes also stops people gaining an advantage by using the smallest, skinniest model, and so being harder to hit.   ;Quote:Original post by AnddosI am wondering why games use hitboxes such as hl2,tf2,ccs etc, whats wrong with testing against the faces of the mesh if the direction of the bullets hit it...Often you don't want to test against exactly the mesh you're displaying, particularly in a multiplayer game. If I'm using one character skin that has more frills (backpack, satchels, etc.) then I'd be at a disadvantage compared to the guy using a more streamlined skin. Using a seperate representation for collision (like hit boxes, or capsules, or even a low-poly collision mesh) makes things fairer.Similarly, often a model will have frilly bits which shouldn't count for collision (like flowing capes, or antennas, etc.).And sometimes you want your collision model to be smooth so that objects don't get caught on it (particularly when applying rag-doll effects). So making the collision model out of smooth primitives like capsules and spheres can make the physics simulation more stable and less likely to explode.Finally, there's division of responsibilities. Artists should be thinking about how to make things look good, and shouldn't have to worry about how their model will affect game balance. Similarly, a game designer can go and tweek the hitboxes (eg. to make head shots easier or harder) without having to find an artist to change the model. For single player games, different difficulties might use different collision models (eg. so headshots are more forgiving on easier levels).   ;  so each hitbox is still a mesh tho right , and the bullets have a raypos and ray dir traveling at the direction fired and test against each mesh hitbox.   ;Quote:Original post by rneckelmann10 people firing automatic shotguns at the same time.Though one has to mention that modern ray tracers (even for dynamic scenes) calculate a few million intersections per second on halfway modern machinery.   