HLMV create hitboxes: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Fixing double redirect. This action was performed by a bot.)
Tag: Redirect target changed
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
If you are starting from scratch, you can use HLMV to create a base set of hitboxes, and then modify them to fit your models needs.  This page will take you step by step through the process of creating a base set, and then modifying it for your models needs.  In order for this to work, you will need a model that compiles properly and has a least 1 bone that the geometry is skinned to.
#REDIRECT [[Half-Life Model Viewer]]
 
== Auto Generating hitboxes ==
The first thing we'll do is get HLMV to to create a set of hitboxes for us.  When it does this it will create a hitbox for every bone that has geometry skinned to it, and will fit the hitbox around that geometry.
 
#Open HLMV and load your model.  From the Render tab press <code>CTRL+H</code> or select the <code>Hit Boxes</code> checkbox to view the hitboxes
#*
#Select the <code>Bones</code> tab. If you did not create hitboxes in your <code>.qc/.qci</code> file(s) then the <code>Auto-Generate Hitboxes</code> checkbox should be ON.  If you have specified some hitboxes, turning on the auto-generation will do nothing.
#*
#With the auto-generated hitboxes visible, click <code>Generate QC</code> button.  This will copy the .qc commands needed to create the auto-generated hitboxes into your clipboard.
#*
#Open your model's <code>.qc</code> or create a new <code>hitbox.qci</code> file with your favorite text editor. <code>CTRL+V</code> to paste the autogenerated .qc lines into the file, save it, and recompile your model.  It's a good idea to format the pasted commands into something more legible, especially if you plan on modifying the hitboxes.  It should look something like this:
#*
 
== Creating new hitboxes and hitbox sets==
The easiest way to create new hitboxes or hitbox sets is to simply cut or copy & paste the lines in the .qc that refer to a hitbox on the bone you'd like to add the hitbox to.
 
<p>You can create a new hitbox set by adding <code>$hboxset "your_set_name_here"</code> and then cutting or copy & pasting the .qc commands for an existing hitbox below.
 
<p>Once you've finished adding the all the hitboxes and sets you need, save the file and recompile the model.
 
== Modifying your hitboxes with HLMV ==
Once you have a base set of hitboxes and, using a combination of HLMV and old school text editing is the fastest way to modify your hitboxes to your needs.

Latest revision as of 15:17, 21 January 2024