$origin: Difference between revisions
Jump to navigation
Jump to search
Note:This command does not adjust positions of everything. It will adjust meshes, skeletons and $attachments, but not anything else such as hitboxes ($hbox).
Note:$origin does not work if the model uses $includemodel.
TomEdwards (talk | contribs) (redone; the details about flipping axes with left-handed models are too specific for this article) |
No edit summary |
||
(9 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
{{LanguageBar}} | |||
{{tabsBar|main=gs|base=$origin}} | |||
{{this is a|QC command|name=$origin}} It adjusts the position (and optionally Z rotation) of a model within its own local space. During compiling, it will be offset by the X, Y, -Z and Z-rotation values provided. | |||
This is useful when adjusting [[Viewmodel|view models]], for ensuring that models don't spawn inside the world, and helping in the arranging of clusters of separate models that need to be aligned precisely with each other (e.g. parts of a building). | This is useful when adjusting [[Viewmodel|view models]], for ensuring that models don't spawn inside the world, and helping in the arranging of clusters of separate models that need to be aligned precisely with each other (e.g. parts of a building). | ||
{{note|This command does not adjust positions of everything. It will adjust meshes, skeletons and [[$attachment]]s, but not anything else such as hitboxes ([[$hbox]]).}} | |||
{{note|$origin does not work if the model uses [[$includemodel]].}} | |||
== Syntax == | == Syntax == | ||
Line 8: | Line 13: | ||
Note that Z's value is reversed. | Note that Z's value is reversed. | ||
== With viewmodels == | |||
[[File:Cssorigins.GIF|center]] | |||
== See also == | == See also == | ||
Line 13: | Line 21: | ||
* [[$autocenter]] | * [[$autocenter]] | ||
* [[Origin]] | * [[Origin]] | ||
Latest revision as of 21:55, 18 July 2025
$origin
is a QC command available in all Source games. It adjusts the position (and optionally Z rotation) of a model within its own local space. During compiling, it will be offset by the X, Y, -Z and Z-rotation values provided.
This is useful when adjusting view models, for ensuring that models don't spawn inside the world, and helping in the arranging of clusters of separate models that need to be aligned precisely with each other (e.g. parts of a building).


Syntax
$origin <x> <y> <-z> [z rotation]
Note that Z's value is reversed.