ICSGCylinder

继承: ICSGPrimitiveBase < ICSGShapeBase < GeometryRender < VisualRender < Item3D < Item < Object

CSG 圆柱形状。

描述

此节点允许您创建用于 CSG 系统的圆柱体(或圆锥体)。

注意: CSG节点旨在用于关卡原型设计。与创建CSG节点旨在用于关卡原型设计。与创建 MeshRender 使用 PrimitiveMesh . 在另一个CSG节点中移动一个CSG节点也会产生很高的CPU成本,因此在开发过程中应避免这样做。

属性


属性说明

bool cone = false 🔗

  • void set_cone(value: bool)

  • bool is_cone()

如果为 true,则创建圆锥,仅在一侧应用 radius


float height = 2.0 🔗

  • void set_height(value: float)

  • float get_height()

圆柱体的高度。


Material material 🔗

用于渲染圆柱体的材质。


float radius = 0.5 🔗

  • void set_radius(value: float)

  • float get_radius()

圆柱体的半径。


int sides = 8 🔗

  • void set_sides(value: int)

  • int get_sides()

圆柱体的边数越多,圆柱体的细节越多。


bool smooth_faces = true 🔗

  • void set_smooth_faces(value: bool)

  • bool get_smooth_faces()

如果为 true,则将圆柱体的法线设置为具有平滑效果,使圆柱体看起来是圆形的。如果为 false,则圆柱体将具有平坦的阴影表现。