Extrudes a 2D polygon shape to create a 3D mesh.
An array of 2D points is extruded to quickly and easily create a variety of 3D meshes. See also CSGMesh3D for using 3D meshes 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 MeshInstance3D with a PrimitiveMesh. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay.
Material to use for the resulting mesh. The UV maps the top half of the material to the extruded shape (U along the length of the extrusions and V around the outline of the polygon), the bottom-left quarter to the front end face, and the bottom-right quarter to the back end face.
When mode is MODE_PATH, this will determine if the interval should be by distance (PATH_INTERVAL_DISTANCE) or subdivision fractions (PATH_INTERVAL_SUBDIVIDE).
When mode is MODE_PATH, if true the Transform3D of the CSGPolygon3D is used as the starting point for the extrusions, not the Transform3D of the path_node.
The point array that defines the 2D polygon that is extruded. This can be a convex or concave polygon with 3 or more points. The polygon must not have any intersecting edges. Otherwise, triangulation will fail and no mesh will be generated.
Note: If only 1 or 2 points are defined in polygon, no mesh will be generated.
PATH_ROTATION_POLYGON = 0The polygon shape is not rotated.
Note: Requires the path Z coordinates to continually decrease to ensure viable shapes.
PATH_ROTATION_PATH = 1The polygon shape is rotated along the path, but it is not rotated around the path axis.
Note: Requires the path Z coordinates to continually decrease to ensure viable shapes.
PATH_ROTATION_PATH_FOLLOW = 2The polygon shape follows the path and its rotations around the path axis.
PATH_INTERVAL_DISTANCE = 0When mode is set to MODE_PATH, path_interval will determine the distance, in meters, each interval of the path will extrude.
PATH_INTERVAL_SUBDIVIDE = 1When mode is set to MODE_PATH, path_interval will subdivide the polygons along the path.