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

$root: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(8 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{tabsBar|main=gs|base=$root}}
{{stub}}
{{stub}}
<!-- The exact behaviors should be explained, does this link other roots to the specified bone? What happens to it's parents? -->
{{this is a|QC command|name=$root}} It resets what bone is used as the "root" bone if there are multiple root - no parent - bones. The root bone is used for all movement and rotation calculations, as well as setting the root bone for ragdolls. This command is usually used to remove controller bones from the animation process.


Changes the hiracy so that the specifyed bone becomes the root. This command is usualy used to remove controler bones from the animation process.
== Syntax ==


==Description==
$root <bone name>


$root "bone-name"
== Example ==


==Example==
  $modelname "npcs/dog.mdl"
  $modelname "npcs/dog.mdl"
  $cdmaterials "models/npcs/"
  $cdmaterials "models/npcs/"
  $model "Dog" "dog.smd"
  $model Dog "dog"
  '''$root "pelvis"'''
  '''$root "pelvis"'''
  $sequence "idle" "idle.smd"
  $sequence idle "idle"

Latest revision as of 17:43, 3 August 2025

Stub

This article or section is a stub. You can help by expanding it.

$root is a QC command available in all Source Source games. It resets what bone is used as the "root" bone if there are multiple root - no parent - bones. The root bone is used for all movement and rotation calculations, as well as setting the root bone for ragdolls. This command is usually used to remove controller bones from the animation process.

Syntax

$root <bone name>

Example

$modelname "npcs/dog.mdl"
$cdmaterials "models/npcs/"
$model Dog "dog"
$root "pelvis"
$sequence idle "idle"