This article's documentation is for anything that uses the Source engine. Click here for more information.

$scale

From Valve Developer Community
Revision as of 19:21, 18 December 2023 by Goldermor (talk | contribs)
Jump to navigation Jump to search

English (en)Translate (Translate)

The $scale QC command multiplies the size of all subsequent model files. it does not affect values defined in the QC itself (e.g., $attachment locations).

Template:ModernNote Template:ModernNote Template:ModernNote Template:ModernWarning Template:ModernWarning Template:ModernWarning

Sequences or animations can be scaled individually by specifying the "scale" option, see below for an example.

Template:ModernNote

Example

$scale

$modelname		"weapons/shell.mdl"
$cdmaterials	"models/weapons/"

$scale		3		// before any model files such as SMD or DMX)
$body		shell	"shell_ref.smd"
$sequence	idle	"shell_idle.smd"

$sequence scale

$sequence spin fan_spin.smd {
        fps 30
        scale 3
}

Values for International System of Units

Values for scaling meshes if the model was based on SI. Unscaled models may have incorrect dimensions.

1 foot = 16 units
Millimeters 0,05249
Centimeters 0,5249
Meters 52,496
Kilometers 52496
1 foot = 12 units
Millimeters 0.03937
Centimeters 0.3937
Meters 39.37
Kilometers 39370

See Also

Dimensions