A soft mesh physics body.
    public class SoftBody : MeshInstance

A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials.

Inheritance Chain


    public SoftBody()


    public float AreaAngularStiffness { get; set; }

    public int 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 int CollisionMask { get; set; }

The physics layers this area scans for collisions.

    public float DampingCoefficient { get; set; }

    public float DragCoefficient { get; set; }

    public float LinearStiffness { get; set; }

    public NodePath ParentCollisionIgnore { get; set; }

    public float PoseMatchingCoefficient { get; set; }

    public float PressureCoefficient { get; set; }

    public int SimulationPrecision { get; set; }

Increasing this value will improve the resulting simulation, but can affect performance. Use with care.

    public float TotalMass { get; set; }

    public float VolumeStiffness { get; set; }


    public void AddCollisionExceptionWith(Node body)

Adds a body to the list of bodies that this body can’t collide with.

    public float GetAreaAngularStiffness()

Getter for AreaAngularStiffness

    public Godot.Collections.Array GetCollisionExceptions()

Returns an array of nodes that were added as collision exceptions for this body.

    public int GetCollisionLayer()

Getter for CollisionLayer

    public bool GetCollisionLayerBit(int bit)

Returns an individual bit on the collision mask.

    public int GetCollisionMask()

Getter for CollisionMask

    public bool GetCollisionMaskBit(int bit)

Returns an individual bit on the collision mask.

    public float GetDampingCoefficient()

Getter for DampingCoefficient

    public float GetDragCoefficient()

Getter for DragCoefficient

    public float GetLinearStiffness()

Getter for LinearStiffness

    public NodePath GetParentCollisionIgnore()

Getter for ParentCollisionIgnore

    public float GetPoseMatchingCoefficient()

Getter for PoseMatchingCoefficient

    public float GetPressureCoefficient()

Getter for PressureCoefficient

    public int GetSimulationPrecision()

Getter for SimulationPrecision

    public float GetTotalMass()

Getter for TotalMass

    public float GetVolumeStiffness()

Getter for VolumeStiffness

    public bool IsRayPickable()

    public void RemoveCollisionExceptionWith(Node body)

Removes a body from the list of bodies that this body can’t collide with.

    public void SetAreaAngularStiffness(float areaAngularStiffness)

Setter for AreaAngularStiffness

    public void SetCollisionLayer(int collisionLayer)

Setter for CollisionLayer

    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.

    public void SetCollisionMask(int collisionMask)

Setter for CollisionMask

    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.

    public void SetDampingCoefficient(float dampingCoefficient)

Setter for DampingCoefficient

    public void SetDragCoefficient(float dragCoefficient)

Setter for DragCoefficient

    public void SetLinearStiffness(float linearStiffness)

Setter for LinearStiffness

    public void SetParentCollisionIgnore(NodePath parentCollisionIgnore)

Setter for ParentCollisionIgnore

    public void SetPoseMatchingCoefficient(float poseMatchingCoefficient)

Setter for PoseMatchingCoefficient

    public void SetPressureCoefficient(float pressureCoefficient)

Setter for PressureCoefficient

    public void SetRayPickable(bool rayPickable)

    public void SetSimulationPrecision(int simulationPrecision)

Setter for SimulationPrecision

    public void SetTotalMass(float mass)

Setter for TotalMass

    public void SetVolumeStiffness(float volumeStiffness)

Setter for VolumeStiffness