$body: Difference between revisions
Jump to navigation
Jump to search
Note:All $body meshes will display simultaneously. Toggleable reference meshes can be handled with a $bodygroup.
Tip:The order in which $body meshes are defined in the QC determines the order in which the meshes are rendered. This can be used to prevent z-fighting on transclucent decals or overlays.
TomEdwards (talk | contribs) No edit summary |
(Removing deprecated Category) |
||
(18 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
{{LanguageBar|title=$body}}{{tabsBar|main=gs|base=$body}} | |||
{{this is a|QC command|name=$body}} | |||
It is used to add a [[reference mesh]] to a model. Without at least one <code>$body</code>, {{ent|$bodygroup}}, or {{ent|$model (QC)|alt=$model}}, the model will be invisible. | |||
{{note|All {{code|$body}} meshes will display simultaneously. Toggleable reference meshes can be handled with a {{ent|$bodygroup}}. | |||
{{tip|The order in which {{code|$body}} meshes are defined in the QC determines the order in which the meshes are rendered. This can be used to prevent z-fighting on transclucent decals or overlays.}} | |||
}} | |||
== Syntax == | == Syntax == | ||
$body <name> <reference mesh [[Studiomdl Data|SMD]]> | $body <name> <reference mesh [[Studiomdl Data|SMD]]> [reverse] [scale <[[int]]>] | ||
== Example == | == Example == | ||
Line 13: | Line 15: | ||
[[$modelname]] "weapons/shell.mdl" | [[$modelname]] "weapons/shell.mdl" | ||
[[$cdmaterials]] "models/weapons/" | [[$cdmaterials]] "models/weapons/" | ||
'''[[$body]] shell "shell_ref | '''[[$body]] shell "shell_ref"''' | ||
[[$sequence]] idle "shell_idle | [[$sequence]] idle "shell_idle" | ||
== See also == | == See also == | ||
*[[Reference mesh]] | *[[Reference mesh]] | ||
* | *{{ent|$lod}}, for lowering detail at a distance | ||
* | *{{ent|$bodygroup}}, for managing toggleable meshes | ||
* | *{{ent|$model (QC)|alt=$model}}, for facial animation | ||
Latest revision as of 21:09, 16 July 2025
$body
is a QC command available in all Source games.
It is used to add a reference mesh to a model. Without at least one
$body
, $bodygroup, or $model, the model will be invisible.


Syntax
$body <name> <reference mesh SMD> [reverse] [scale <int>]
Example
$modelname "weapons/shell.mdl" $cdmaterials "models/weapons/" $body shell "shell_ref" $sequence idle "shell_idle"
See also
- Reference mesh
- $lod, for lowering detail at a distance
- $bodygroup, for managing toggleable meshes
- $model, for facial animation