CSGShape
Inherited By: , CSGPrimitive
Category: Core
The CSG base class.
Properties
get_collision_layer_bit ( bit ) const | |
bool | ( int bit ) const |
get_meshes ( ) const | |
is_root_shape ( ) const | |
void | ( int bit, value ) |
void | set_collision_mask_bit ( bit, bool value ) |
Enumerations
enum Operation:
- OPERATION_UNION = 0 — Geometry of both primitives is merged, intersecting geometry is removed.
- OPERATION_INTERSECTION = 1 — Only intersecting geometry remains, the rest is removed.
- OPERATION_SUBTRACTION = 2 — The second shape is subtracted from the first, leaving a dent with its shape.
This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot.
Property Descriptions
- calculate_tangents
- int collision_layer
Setter | set_collision_layer(value) |
Getter | get_collision_layer() |
The physics layers this area is in.
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.
- collision_mask
The physics layers this CSG shape scans for collisions.
Setter | set_operation(value) |
Getter | get_operation() |
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.
- float snap
- use_collision
Setter | set_use_collision(value) |
Getter | is_using_collision() |
- bool get_collision_layer_bit ( bit ) const
Returns an individual bit on the collision mask.
- bool get_collision_mask_bit ( bit ) const
Returns an individual bit on the collision mask.
- Array get_meshes ( ) const
- is_root_shape ( ) const
Returns if this is a root shape and is thus the object that is rendered.
Sets individual bits on the layer mask. Use this if you only need to change one layer’s value.
- void set_collision_mask_bit ( int bit, value )
Sets individual bits on the collision mask. Use this if you only need to change one layer’s value.