CSGMesh

Inherits: CSGPrimitive < CSGShape < GeometryInstance < VisualInstance < CullInstance < Spatial < Node < Object A CSG Mesh shape that uses a mesh resource.

Description

CSGPolygon for drawing 2D extruded polygons to be used as CSG nodes. Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a MeshInstance with a PrimitiveMesh. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay.

Tutorials

  • Prototyping levels with CSG

    Properties

    Property Descriptions

  • Material material Material used in drawing the CSG shape.

  • Mesh mesh Mesh resource to use as a CSG shape. Note: When using an ArrayMesh, avoid meshes with vertex normals unless a flat shader is required. By default, CSGMesh will ignore the mesh’s vertex normals and use a smooth shader calculated using the faces’ normals. If a flat shader is required, ensure that all faces’ vertex normals are parallel.