$hbox: Difference between revisions
Jump to navigation
Jump to search
Trigger hurt (talk | contribs) m (Improve legibility of the first line & remove useless entry in See Also section.) |
No edit summary |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{LanguageBar|title = <code>$hbox</code>}} | {{LanguageBar|title = <code>$hbox</code>}} | ||
{{tabsBar|main=gs|base=$hbox}} | |||
{{this is a|QC command|name=$hbox}} It creates a [[hitbox]] around a bone. These hitboxes are used by the [[:Category:AI|AI]] for simple collisions, such as bullets. | {{this is a|QC command|name=$hbox}} It creates a [[hitbox]] around a bone. These hitboxes are used by the [[:Category:AI|AI]] for simple collisions, such as bullets. | ||
{{update|Document about CS:GO's hit capsules}} | {{update|Document about CS:GO's hit capsules}} | ||
Line 10: | Line 11: | ||
When a hitbox is added to a [[Skeleton|bone]], it has an additional group parameter before the name of the bone which can change how the hit is calculated for damage. Many [[NPC]] as well as certain [[Vehicles_(modeling)|vehicles]] follow a scheme for each hitbox. | When a hitbox is added to a [[Skeleton|bone]], it has an additional group parameter before the name of the bone which can change how the hit is calculated for damage. Many [[NPC]] as well as certain [[Vehicles_(modeling)|vehicles]] follow a scheme for each hitbox. | ||
* <code>$hbox '''0''' - Generic - the default group of hitboxes, appears White in HLMV </code> | * <code>$hbox '''0''' - Generic - the default group of hitboxes, appears White in [[Half-Life Model Viewer|HLMV]] </code> | ||
* <code>$hbox '''1''' - Head - Used for human NPC heads and to define where the player sits on the vehicle.mdl, appears Red in HLMV </code> | * <code>$hbox '''1''' - Head - Used for human NPC heads and to define where the player sits on the vehicle.mdl, appears Red in HLMV </code> | ||
* <code>$hbox '''2''' - Chest - Used for human NPC midsection and chest, appears Green in HLMV </code> | * <code>$hbox '''2''' - Chest - Used for human NPC midsection and chest, appears Green in HLMV </code> | ||
Line 17: | Line 18: | ||
* <code>$hbox '''5''' - Right Arm - Used for human Right Arm, appears Bright Violet in HLMV </code> | * <code>$hbox '''5''' - Right Arm - Used for human Right Arm, appears Bright Violet in HLMV </code> | ||
* <code>$hbox '''6''' - Left Leg - Used for human Left Leg, appears Bright Cyan in HLMV </code> | * <code>$hbox '''6''' - Left Leg - Used for human Left Leg, appears Bright Cyan in HLMV </code> | ||
* <code>$hbox '''7''' - Right Leg - Used for human Right Leg, appears White like the default group in HLMV </code> | * <code>$hbox '''7''' - Right Leg - Used for human Right Leg, appears White like the default group in HLMV (Orange in {{gmod}})</code> | ||
* <code>$hbox '''8''' - Neck - Used for human neck (to fix penetration to head from behind), appears Orange in HLMV</code> {{since|{{csgo}}}} | * <code>$hbox '''8''' - Neck - Used for human neck (to fix penetration to head from behind), appears Orange in HLMV </code> {{since|{{csgo}}}} | ||
==Syntax== | ==Syntax== | ||
Line 31: | Line 32: | ||
[[Category:Modeling]] | [[Category:Modeling]] | ||
[[Category:Source]] | [[Category:Source]] |
Latest revision as of 20:54, 18 July 2025
$hbox
is a QC command available in all Source games. It creates a hitbox around a bone. These hitboxes are used by the AI for simple collisions, such as bullets.

This article or section needs to be updated to include current information regarding the subject because:
Document about CS:GO's hit capsules
Remember to check for any notes left by the tagger at this article's talk page.Running studiomdl with the -h
option will print out all of the autogenerated hitboxes.
If any hitboxes are defined this way, autohitbox generation is disabled.
Hitbox Groups
When a hitbox is added to a bone, it has an additional group parameter before the name of the bone which can change how the hit is calculated for damage. Many NPC as well as certain vehicles follow a scheme for each hitbox.
$hbox 0 - Generic - the default group of hitboxes, appears White in HLMV
$hbox 1 - Head - Used for human NPC heads and to define where the player sits on the vehicle.mdl, appears Red in HLMV
$hbox 2 - Chest - Used for human NPC midsection and chest, appears Green in HLMV
$hbox 3 - Stomach - Used for human NPC stomach and pelvis, appears Yellow in HLMV
$hbox 4 - Left Arm - Used for human Left Arm, appears Deep Blue in HLMV
$hbox 5 - Right Arm - Used for human Right Arm, appears Bright Violet in HLMV
$hbox 6 - Left Leg - Used for human Left Leg, appears Bright Cyan in HLMV
$hbox 7 - Right Leg - Used for human Right Leg, appears White like the default group in HLMV (Orange in
)
$hbox 8 - Neck - Used for human neck (to fix penetration to head from behind), appears Orange in HLMV
(in all games since)
Syntax
$hbox (group number) (bone name) (min x) (min y) (min z) (max x) (max y) (max z)