Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

CSGShape3D

Inherits: GeometryInstance3D < VisualInstance3D < Node3D < Node < Object

Inherited By: CSGCombiner3D, CSGPrimitive3D

The CSG base class.

Description

This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot.

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

bool

calculate_tangents

true

int

collision_layer

1

int

collision_mask

1

float

collision_priority

1.0

Operation

operation

0

float

snap

0.001

bool

use_collision

false

Methods

bool

get_collision_layer_value ( int layer_number ) const

bool

get_collision_mask_value ( int layer_number ) const

Array

get_meshes ( ) const

bool

is_root_shape ( ) const

void

set_collision_layer_value ( int layer_number, bool value )

void

set_collision_mask_value ( int layer_number, bool value )


Enumerations

enum Operation: