Hitbox: Difference between revisions
| m (Removed categories from subpage) | No edit summary | ||
| (2 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
| {{ | {{LanguageBar}} | ||
| [[File:Hitbox.jpg|right|250px]] | [[File:Hitbox.jpg|right|250px]] | ||
| Line 11: | Line 12: | ||
| == Console Commands == | == Console Commands == | ||
| {{varcom|start}} | |||
| {{ | {{varcom|sv_showhitboxes||int|Displays the server-side hitboxes of the specified player index, bypassing any <code>net_fakelag</code>. 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.}} | : 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.}} | ||
| {{varcom|end}} | |||
| == See also == | == See also == | ||
| Line 20: | Line 22: | ||
| * {{ent|$hboxset}} | * {{ent|$hboxset}} | ||
| * [[Lag Compensation]] | * [[Lag Compensation]] | ||
| [[Category:Modeling]] | |||
| [[Category:Glossary]] | |||
| {{stub}} | |||
Latest revision as of 10:27, 19 March 2025
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.
Creating Hitboxes
There are a couple ways of creating hitboxes.  You can create them manually from scratch through the .qc commands or allow  HLMV to auto-generate a set for you and then modify them from there. If your QC file is getting cluttered, the best way to keep your QC files organized is to create a
 HLMV to auto-generate a set for you and then modify them from there. If your QC file is getting cluttered, the best way to keep your QC files organized is to create a hitbox.qci file which contains your hitbox data. You can link to it from your model's primary QC file with $include hitbox.qci.
Console Commands
| Cvar/Command | Parameters or default value | Descriptor | Effect | 
|---|---|---|---|
| sv_showhitboxes | int | 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.
 | 
See also


























