Hitbox

From Valve Developer Community
Revision as of 05:50, 19 September 2011 by Artfunkel (talk | contribs)
Jump to navigation Jump to search
Hitbox.jpg

A hitbox is an invisible box (or more often a series of boxes) which define the rough shape of a model for purposes of damage-based collision detection. A typical model within a game is much too high-poly to perform real-time hit calculations on, so hitboxes are used instead.

A hitbox is different from a bounding box in that it is more complex and closer to the model's visible shape. The bounding box is used for movement-based collision detection, and is usually literally a single box.

Console commands

sv_showhitboxes <integerRedirectInput/integer>
Displays the server-side hitboxes of the specified player index, bypassing any net_fakelag. Generates a lot of traffic, so should only be used on local servers.
This has been removed from Valve's games due to the confusion it causes with regard to lag compensation, but is still in the mod SDK.

See also