Hitbox

From Valve Developer Community
< Pt-br
Revision as of 11:34, 8 September 2024 by Noob dev2323 (talk | contribs) (Created page with "{{subst:#if: CREATING TRANSLATION OF 'Hitbox' to 'português do Brasil' VIA Template:LanguageBar BUTTONS...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Info content.png
This page needs to be translated.
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

English (en)Português do Brasil (pt-br)中文 (zh)Translate (Translate)
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.

Creating Hitboxes

There are a couple ways of creating hitboxes. You can create them manually from scratch through the .qc commands or allow HLMV 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

sv_showhitboxes <integer(en)>
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


Stub

This article or section is a stub. You can help by expanding it.