Parts 是 Class.BasePart 类的后代,是 Roblox 的原始构建块,具有位置、大小、方向和颜色等属性。您可以使用基本部分作为是,或您可以应用 固体建模操作 将部分组合成更复杂的形式。
对于高级和复杂的 3D 模型,您还可以导入第三方模型文件作为 MeshParts 如在 网格 中所示。



默认情况下,零件是实体,它们跟随真实世界的物理机制,包括重力、碰撞和向量。您可以通过使用 Class.WeldConstraint 或类似 WeldConstraint 或 Motor6D 来连接相关零件。作
您可以使用 Model 容器来组合相关零件,并通过 Explorer 单个组合为一个装配在一起的单个组。请参阅 模型 获取更多信息。
基本部件类型
Part 对象可以采取块、球、圆柱体、楔子或角楔子的形状。 另外,TrussPart 作为角色扮演梯子可以攀爬的梯子形状的梯子形状。





零件属性
每个部分都有各种您可以通过 属性 窗口自定义的属性。

以下是常见的属性:
Anchored 控制如果物理影响零件的位置。当此属性设置为真时,零件永远不会因重力或任何其他力而改变位置。您应该在您的体验或重力上锚定大多数零件。当体验运行时,您的零件必须锚定在您的体验上,否则您的零件将受到影响。
CanCollide 控制是否会有部分与其他部分碰撞。当此属性设置为“真”时,零件是不可侵犯的,物理引擎在您的体验中代表它。相反,当此属性设置为“错误”时,零件可以通过任何东西,而物理引擎不会在您的体验中代表它。
Transparency 设置零件的可见度为任何值,在默认值 0 (完全可见) 和 1 (完全透明) 之间。如果您有很多部分透明零件,它们可能会减慢性能。为了解决此问题,请使用固体建模将它们合并。
插入零件
零件按钮将新零件插入工作区。 单击按钮上的小下拉箭头让您选择 块 、 球 、 角 、或 2> 楔子2> 。 您可以选择 5> 零件5> 、 8> 球8> 、 1> 角 1> 、或 4> 楔子4> 。

选择零件
当您将鼠视图悬停在零件上时,它们会被标出以表示其潜在选择。您可以通过单击标出的零件来选择它们,或者您可以通过按住 Shift , Ctrl 或 ⌘ 来选择多个零件。在 3D 视图中选择零件的高级方法见 1> 在这里1>

变形零件
您可以通过“选择”模型工具或通过设置“属性”窗口中的新位置、大小或方向来移移动工具、缩放和旋转选定的零件。
使用工具时,您可以在 世界 或 本地 方向或 Ctrl0>L0> 在 Windows 上启用时,部件的箭头轴指示器将更改为部件的本地方向,而 3>L3> 指示器显示。 当您启用本地

移动
您可以使用 移动 工具(默认快捷方式 2)或通过 鼠标拖动 来将选定的部分移动到新的位置。 在移动部分时,您可以暂时切换 1> 粘贴1> 通过持有 4> Shift4> 。

要将零件沿 X 、 Y 或 Z 轴拖动,单击/拖动一个箭头,指向所需的移动方向。

拖动后,数字 距离指示器 仍然可见。如果需要,请调整移动到指示器内的距离,然后输入任何数字。

如果您选择了 移动 工具,而拖动零件的 pivot 点 在 pivot 点上,零件的 pivot 会“软硬捕捉”到表面和边缘的零件。

缩放
要将选定的零件沿 X 、 Y 或 Z 轴缩放,请使用 1> 缩放1> 工具(默认快捷方式 4> 3 4>)并单击/拖动一个手柄。 在拖动时,您可以暂时切换 7> 锁定7> 来切换 0>


旋转
要在 X , Y 或 Z 轴上旋转选定的零件,请使用 1> 旋转1> 工具(默认快捷方式 4> 44>)和单击/拖动旋转环。在拖动时,您可以暂时切换 7> 粘贴7> ,持有 0> Shift


染色零件
虽然默认情况下零件是灰色的,但您可以通过以下方法将其更改为任何颜色。
六角地图
单击 颜色 小下拉箭头显示六边形颜色选择器。

默认情况下,单击整个 颜色 按钮将选定的颜色应用于任何 选定 部分。如果您更喜欢使用填充/油漆工作流程,请切换 颜色操作作为工具,然后单击 3D 视窗中的部分来应用选定的颜色。

颜色弹出
颜色弹出窗口允许您通过您操作系统的颜色选择控件 widget 设置颜色。要访问它,请导航到属性窗口,然后单击左侧的小框并单击Color属性。

RGB 值
要为零件定义特定的 RGB 颜色值,请在 Color 属性值中输入 RGB 值。

应用材料
与 颜色 类似,您可以自定义零件的 材料 来模拟真实世界的材料,例如木材、玻璃或织物。当选择材料时,请考虑以下几点:
材料会影响零件的物理特性,而不仅是其外观 。例如, 混凝土 材料比 塑料 材料重,因此混凝土砖的密度会高于塑料砖,因此在水中沉淀得更快。
有些材料有特殊的物理效果。例如,如果将零件设置为 霓虹 材料,它们会发光。
SmoothPlastic) 霓虹灯
有关如何在零件上应用默认和自定义材料的信息,请参阅材料。