$autocenter: Difference between revisions
Jump to navigation
Jump to search
Tip:This could be useful when Creating custom gibs, to ensure that each gib has a sensible ModelOrigin (center) for lighting, collision, etc. but spawns in the correct position relative to its parent breakable model. Simply model the gibs as a cluster - in their spawn positions, then export each gib separately and add
SirYodaJedi (talk | contribs) mNo edit summary |
SirYodaJedi (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
{{This is a|name=$autocenter|QC command}} It aligns the model's [[$origin]] to the center of its [[bounding box]] and creates an [[attachment point]] called "placementOrigin" where its origin used to be. This attachment will be used to automatically place the model in the right location when [[$collisiontext|used as a custom gib]]. | {{This is a|name=$autocenter|QC command}} It aligns the model's [[$origin]] to the center of its [[bounding box]] and creates an [[attachment point]] called "placementOrigin" where its origin used to be. This attachment will be used to automatically place the model in the right location when [[$collisiontext|used as a custom gib]] for a static breakable. | ||
{{tip|This could be useful when [[Creating custom gibs]], to ensure that each gib has a sensible ModelOrigin (center) for [[$illumposition|lighting]], [[$masscenter|collision]], etc. but spawns in the correct position relative to its parent breakable model. Simply model the gibs as a cluster - in their spawn positions, then export each gib separately and add <code>$autocenter</code> to each gib's QC file. Unfortunatelly, $autocenter only works on | {{tip|This could be useful when [[Creating custom gibs]], to ensure that each gib has a sensible ModelOrigin (center) for [[$illumposition|lighting]], [[$masscenter|collision]], etc. but spawns in the correct position relative to its parent breakable model. Simply model the gibs as a cluster - in their spawn positions, then export each gib separately and add <code>$autocenter</code> to each gib's QC file. Unfortunatelly, $autocenter only works on $staticprop.}} | ||
== Syntax == | == Syntax == | ||
$autocenter | $autocenter | ||
Latest revision as of 13:34, 14 November 2025
$autocenter is a QC command available in all
Source games. It aligns the model's $origin to the center of its bounding box and creates an attachment point called "placementOrigin" where its origin used to be. This attachment will be used to automatically place the model in the right location when used as a custom gib for a static breakable.
$autocenter to each gib's QC file. Unfortunatelly, $autocenter only works on $staticprop.Syntax
$autocenter