This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot.
[b]Note:[/b] 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.
</description>
<tutorials>
<linktitle="Prototyping levels with CSG">$DOCS_URL/tutorials/3d/csg_tools.html</link>
Returns an [Array] with two elements, the first is the [Transform] of this node and the second is the root [Mesh] of this node. Only works when this node is the root shape.
</description>
</method>
<methodname="is_root_shape"qualifiers="const">
<returntype="bool"/>
<description>
Returns [code]true[/code] if this is a root shape and is thus the object that is rendered.
</description>
</method>
<methodname="set_collision_layer_bit">
<returntype="void"/>
<argumentindex="0"name="bit"type="int"/>
<argumentindex="1"name="value"type="bool"/>
<description>
Sets individual bits on the layer mask. Use this if you only need to change one layer's value.
</description>
</method>
<methodname="set_collision_mask_bit">
<returntype="void"/>
<argumentindex="0"name="bit"type="int"/>
<argumentindex="1"name="value"type="bool"/>
<description>
Sets individual bits on the collision mask. Use this if you only need to change one layer's value.
Calculate tangents for the CSG shape which allows the use of normal maps. This is only applied on the root shape, this setting is ignored on any child.
Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
The physics layers this CSG shape scans for collisions. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent.
Snap makes the mesh snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust.
Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden.