Originally Posted by aos
I was working out an explanation of how hitboxes work after reading about all the ways you can take advantage of them. But this brought up a couple questions I was hoping someone knew.
Hitbox | Flux
Are hitboxes cylindrical or spherical? This is a pain to test and seems inconsistent.
Are hitboxes always as high as they are wide? The best I can tell is that they are, but the centers are sometimes shifted.
Do all aoe abilities calculate center to center or is it just some oddball ones like Demoralizing Shout?
|
I'm not a blizzard programmer, but I have done extensive programming on other 3d games (more specifically,
First Person Shooter Artificial Intelligence), so I can tell you what standard practices are.
The summary is that actual bounding boxes are almost never used except for collision detection, and these are most likely axis-aligned rectangular structures, not spheres or cylinders. This is probably what they use to stop you from walking through walls and gates. Anything more complicated than this requires a ton of processing when computing collision against arbitrary surfaces, except spheres which don't really bound humanoid shapes very well.
If you only need to test distances, however, bounding boxes are generally ignored in favor of a standard distance check. This will result in the appearance of a spherical bound, because the set of points that will be close enough to the center will lie in a sphere. If you want to assume targets are larger than a singular point, you will generally approximate them as a sphere. For example, if the target has a radius of 1 yard and the ability has a radius of 20 yards, the ability hits the target if the target is closer than 21 yards to the source of the ability.