这篇条目有关 Source引擎。如需详情,点击这里。

Zh/$origin: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
No edit summary
(deepseek translation)
 
Line 1: Line 1:
{{wip}}{{translating}}
{{Machine Translation}}
{{LanguageBar}}
{{LanguageBar}}
{{tabsBar|main=gs|base=$origin}}
{{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 a|QC command|name=$origin}} 该命令用于调整模型在自身局部空间中的位置(以及可选的Z轴旋转)。在编译时,模型将根据提供的X、Y、-Z坐标及Z轴旋转值进行偏移。


This is useful when adjusting {{L|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).
此功能适用于调整{{L|Viewmodel|视图模型}},确保模型不会生成在场景内部,并帮助精确对齐需要组合的多个独立模型(例如建筑物的部件)。


{{note|This command does not adjust positions of everything. It will adjust meshes, skeletons and {{L|$attachment}}s, but not anything else such as hitboxes ({{L|$hbox}}).}}
{{note|此命令不会调整所有元素的位置。它会调整网格、骨骼和{{L|$attachment|附着点}},但不会影响其他元素如碰撞框({{L|$hbox}})。}}
{{note|$origin does not work if the model uses {{L|$includemodel}}.}}
{{note|若模型使用了{{L|$includemodel}},则$origin命令无效。}}


== Syntax ==
== 语法 ==


  $origin <x> <y> <-z> [z rotation]
  $origin <x> <y> <-z> [z rotation]


Note that Z's value is reversed.
注意Z值需取反。


== With viewmodels ==
== 视图模型应用 ==
[[File:Cssorigins.GIF|center]]
[[File:Cssorigins.GIF|center]]


== See also ==
== 另见 ==


* {{L|$autocenter}}
* {{L|$autocenter}}
* {{L|Origin}}
* {{L|Origin|原点}}


{{ACategory|QC Commands|origin}}
{{ACategory|QC Commands|origin}}

Latest revision as of 19:10, 18 April 2025

Info content.png
This page is Machine translated
It is not recommended to use machine translation without any corrections.
If the article is not corrected in the long term, it will be removed.
Also, please make sure the article complies with the alternate languages guide.(en)
English (en)Русский (ru)中文 (zh)Translate (Translate)

$origin是一个QC 命令(en),可在所有的 起源 起源 游戏中使用。 该命令用于调整模型在自身局部空间中的位置(以及可选的Z轴旋转)。在编译时,模型将根据提供的X、Y、-Z坐标及Z轴旋转值进行偏移。

此功能适用于调整视图模型(en),确保模型不会生成在场景内部,并帮助精确对齐需要组合的多个独立模型(例如建筑物的部件)。

Note.png注意:此命令不会调整所有元素的位置。它会调整网格、骨骼和附着点(en),但不会影响其他元素如碰撞框($hbox(en))。
Note.png注意:若模型使用了$includemodel(en),则$origin命令无效。

语法

$origin <x> <y> <-z> [z rotation]

注意Z值需取反。

视图模型应用

Cssorigins.GIF

另见