$autocenter

From Valve Developer Community
Revision as of 13:43, 28 April 2008 by JeffLane (talk | contribs) (minor cleanup)
Jump to navigation Jump to search

The QC command $autocenter moves the model so that its $origin is at the center of its bounding box.

  • It also adds an attachment point called "placementOrigin" which is the offset to the original origin.
  • This is useful for building gibs so they have reasonable origins (centered) for lighting, collision, etc. and spawn in the correct position when the parent model breaks. Simply model the gibs as a collection - where you'd want them to be placed, then export them separately and add $autocenter to each gib's QC file.

Syntax

$autocenter