$staticprop: Difference between revisions
Jump to navigation
Jump to search
Bug:If the model being compiled has a bone named
Bug:Bodygroups do not play well with this command.
Trigger hurt (talk | contribs) (Cleaned up misinformation & formatted the article more similarly to other QC commands.) |
SirYodaJedi (talk | contribs) (You can spawn an animated prop as a physics prop; it'll just spawn in ref pose) |
||
Line 4: | Line 4: | ||
[[prop_static|Static props]] are the only models allowed to cast shadows onto the [[lightmap]] and vice-versa during [[VRAD]]. | [[prop_static|Static props]] are the only models allowed to cast shadows onto the [[lightmap]] and vice-versa during [[VRAD]]. | ||
A model flagged with <code>$staticprop</code> is ''not'' necessarily limited to just being used with the <code>prop_static</code> [[point entity]]. | A model flagged with <code>$staticprop</code> is ''not'' necessarily limited to just being used with the <code>prop_static</code> [[point entity]]. <code>[[prop_static]]</code> will not function unless the model was compiled with this command. This command is also recommended for [[physics prop]]s, since physics props have animation forcibly disabled. | ||
{{bug|If the model being compiled has a bone named <code>static_prop</code> already, it can cause the physics model for the prop to be misaligned, should the bone not be oriented how the model compiler expects it to be.}} | {{bug|If the model being compiled has a bone named <code>static_prop</code> already, it can cause the physics model for the prop to be misaligned, should the bone not be oriented how the model compiler expects it to be.}} |
Revision as of 06:17, 4 March 2025
$staticprop
is a QC command available in all Source games. It tells the model compiler that this model is not intended to have any moving parts. This will cause the compiler to strip away the skeleton & animations to just a single, unmoving bone named
static_prop
.
Static props are the only models allowed to cast shadows onto the lightmap and vice-versa during VRAD.
A model flagged with $staticprop
is not necessarily limited to just being used with the prop_static
point entity. prop_static
will not function unless the model was compiled with this command. This command is also recommended for physics props, since physics props have animation forcibly disabled.

static_prop
already, it can cause the physics model for the prop to be misaligned, should the bone not be oriented how the model compiler expects it to be. [todo tested in ?]
prop_static
does not actually support bodygroups anyway, and therefore always defaults to whatever the default bodygroup state is.
- The
blank
keyword will outright fail compilation with an EXCEPTION_ACCESS_VIOLATION error. - VRAD will generate lightmaps for each bodygroup, if they're present, even though this is entirely useless. [todo tested in ?]
Example
$modelname props_junk/metal_paintcan001a.mdl $staticprop $body body metal_paintcan001a_lod0 [...]