$staticprop: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added info about the importance of leavingout the parameters in order to compile the model as a prop_static)
Line 14: Line 14:
  [[$body]] shell "shell-ref.smd"
  [[$body]] shell "shell-ref.smd"
  [[$sequence]] idle "shell-idle.smd" ''// A default animation is still required''
  [[$sequence]] idle "shell-idle.smd" ''// A default animation is still required''
[[$collisionmodel]]      "shell_PHYS.smd"


Note the absence of parameters, this is important in compiling a prop to be used as a [[prop_static]]. If you include the parameters (such as [[$mass]] and [[$inertia]]) then the model will assume that it is a [[prop_physics]] or a [[prop_dynamic]] and will be deleted upon map compilation if it is placed as a prop_static.
Note the absence of parameters, this is important in compiling a prop to be used as a [[prop_static]]. If you include the [[$collisionmodel]] parameters (such as [[$mass]] and [[$inertia]]) then the model will assume that it is a [[prop_physics]] or a [[prop_dynamic]] and will be deleted upon map compilation if it is placed as a prop_static.


{{otherlang:en}}
{{otherlang:en}}

Revision as of 21:44, 4 March 2009

The QC command $staticprop specifies that the model being compiled does not have any moving parts. Despite the name, it does not limit the model to use with prop_static.

The command:

  • Removes all bones except the root.
  • Permits VRAD to use the object's collision mesh to calculate lightmap shadows.
  • Performs several other complex optimisations.

Example

$modelname		"weapons/shell.mdl"
$staticprop
$cdmaterials		"models/weapons/"
$body		shell	"shell-ref.smd"
$sequence	idle	"shell-idle.smd"	// A default animation is still required
$collisionmodel       "shell_PHYS.smd"

Note the absence of parameters, this is important in compiling a prop to be used as a prop_static. If you include the $collisionmodel parameters (such as $mass and $inertia) then the model will assume that it is a prop_physics or a prop_dynamic and will be deleted upon map compilation if it is placed as a prop_static.

Template:Otherlang:en Template:Otherlang:en:ru