The CSG base class.
    public abstract class CSGShape : GeometryInstance

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

Inheritance Chain

Derived Classes

Properties

    public bool CalculateTangents { get; set; }

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.

    public uint CollisionLayer { get; set; }

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.

    public uint CollisionMask { get; set; }

The physics layers this CSG shape scans for collisions.

    public OperationEnum Operation { get; set; }

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.

    public float Snap { get; set; }

    public bool UseCollision { get; set; }

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.

Methods

    [Obsolete("GetCollisionLayer is deprecated. Use the CollisionLayer property instead.")]
    public uint GetCollisionLayer()

    public bool GetCollisionLayerBit(int bit)

Returns an individual bit on the collision mask.

    [Obsolete("GetCollisionMask is deprecated. Use the CollisionMask property instead.")]
    public uint GetCollisionMask()

    public bool GetCollisionMaskBit(int bit)

Returns an individual bit on the collision mask.

    public Godot.Collections.Array GetMeshes()

    [Obsolete("GetOperation is deprecated. Use the Operation property instead.")]
    public OperationEnum GetOperation()

Getter for Operation

    [Obsolete("GetSnap is deprecated. Use the Snap property instead.")]
    public float GetSnap()

Getter for Snap

    [Obsolete("IsCalculatingTangents is deprecated. Use the CalculateTangents property instead.")]
    public bool IsCalculatingTangents()

Getter for CalculateTangents

    public bool IsRootShape()

Returns true if this is a root shape and is thus the object that is rendered.

    [Obsolete("IsUsingCollision is deprecated. Use the UseCollision property instead.")]
    public bool IsUsingCollision()

Getter for UseCollision

    [Obsolete("SetCalculateTangents is deprecated. Use the CalculateTangents property instead.")]
    public void SetCalculateTangents(bool enabled)

Setter for CalculateTangents

    [Obsolete("SetCollisionLayer is deprecated. Use the CollisionLayer property instead.")]
    public void SetCollisionLayer(uint layer)

    public void SetCollisionLayerBit(int bit, bool value)

Sets individual bits on the layer mask. Use this if you only need to change one layer’s value.

    [Obsolete("SetCollisionMask is deprecated. Use the CollisionMask property instead.")]
    public void SetCollisionMask(uint mask)

    public void SetCollisionMaskBit(int bit, bool value)

Sets individual bits on the collision mask. Use this if you only need to change one layer’s value.

    [Obsolete("SetOperation is deprecated. Use the Operation property instead.")]
    public void SetOperation(OperationEnum operation)

Setter for Operation

    [Obsolete("SetSnap is deprecated. Use the Snap property instead.")]
    public void SetSnap(float snap)

Setter for Snap

    [Obsolete("SetUseCollision is deprecated. Use the UseCollision property instead.")]
    public void SetUseCollision(bool operation)

Setter for UseCollision

Inner Types

OperationEnum

Name Value Description
Union 0 Geometry of both primitives is merged, intersecting geometry is removed.
Intersection 1 Only intersecting geometry remains, the rest is removed.
Subtraction 2 The second shape is subtracted from the first, leaving a dent with its shape.
Tags: