Hitbox: Difference between revisions
No edit summary |
No edit summary |
||
(14 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
[[ | {{LanguageBar}} | ||
[[File:Hitbox.jpg|right|250px]] | |||
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 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. | 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 <code>.qc</code> commands or allow {{hlmv|4}} 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 <code>hitbox.qci</code> file which contains your hitbox data. You can link to it from your model's primary QC file with <code>$include hitbox.qci</code>. | |||
== 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.}} | |||
{{varcom|end}} | |||
== See also == | |||
* {{ent|$hbox}} | |||
* {{ent|$hboxset}} | |||
* [[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
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