Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
PlaneMesh
继承: PrimitiveMesh < Mesh < Resource < RefCounted < Object
派生: QuadMesh
表示平面 PrimitiveMesh 的类。
描述
代表平面 PrimitiveMesh 的类。这个扁平的网格没有厚度。默认情况下,这个网格与 X 和 Z 轴对齐;这样的旋转并不适用于公告板材质。对于公告板材质,请将 orientation 改为 FACE_Z。
注意:使用较大且有纹理的 PlaneMesh(例如地板)时,你可能在使用某些相机角度时会遇到 UV 抖动的问题。要解决这个问题,请增大 subdivide_depth 和 subdivide_width,直到无法再察觉到 UV 抖动。
属性
|
||
|
||
|
||
|
||
|
枚举
enum Orientation: 🔗
Orientation FACE_X = 0
PlaneMesh 将面向 X 轴正方向。
Orientation FACE_Y = 1
PlaneMesh 将面向 Y 轴正方向。与 Godot 3.x 中 PlaneMesh 的行为一致。
Orientation FACE_Z = 2
PlaneMesh 将面向 Z 轴正方向。与 Godot 3.x 中 QuadMesh 的行为一致。
属性说明
Vector3 center_offset = Vector3(0, 0, 0)
🔗
生成平面的偏移量。可用于粒子。
Orientation orientation = 1
🔗
void set_orientation(value: Orientation)
Orientation get_orientation()
PlaneMesh 的朝向。可选项见 Orientation。
Vector2 size = Vector2(2, 2)
🔗
生成平面的大小。
沿 Z 轴细分的次数。
沿 X 轴细分的次数。