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...
CSGPolygon3D¶
Inherits: CSGPrimitive3D < CSGShape3D < GeometryInstance3D < VisualInstance3D < Node3D < Node < Object
Extrudes a 2D polygon shape to create a 3D mesh.
Description¶
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.
Tutorials¶
Properties¶
|
||
|
||
|
||
|
||
Enumerations¶
enum Mode:
Mode MODE_DEPTH = 0
The polygon shape is extruded along the negative Z axis.
Mode MODE_SPIN = 1
The polygon shape is extruded by rotating it around the Y axis.
Mode MODE_PATH = 2
The polygon shape is extruded along the Path3D specified in path_node.
enum PathRotation:
PathRotation PATH_ROTATION_POLYGON = 0
The polygon shape is not rotated.
Note: Requires the path Z coordinates to continually decrease to ensure viable shapes.
PathRotation PATH_ROTATION_PATH = 1
The 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.
PathRotation PATH_ROTATION_PATH_FOLLOW = 2
The polygon shape follows the path and its rotations around the path axis.
enum PathIntervalType:
PathIntervalType PATH_INTERVAL_DISTANCE = 0
When mode is set to MODE_PATH, path_interval will determine the distance, in meters, each interval of the path will extrude.
PathIntervalType PATH_INTERVAL_SUBDIVIDE = 1
When mode is set to MODE_PATH, path_interval will subdivide the polygons along the path.
Property Descriptions¶
float depth = 1.0