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

Constructors

    public SoftBody()

Properties

    public float AreaAngularStiffness { get; set; }

    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 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; }

Methods

    public void AddCollisionExceptionWith(Node body)

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

    [Obsolete("GetAreaAngularStiffness is deprecated. Use the AreaAngularStiffness property instead.")]
    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.

    [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.

    [Obsolete("GetDampingCoefficient is deprecated. Use the DampingCoefficient property instead.")]
    public float GetDampingCoefficient()

Getter for DampingCoefficient

    [Obsolete("GetDragCoefficient is deprecated. Use the DragCoefficient property instead.")]
    public float GetDragCoefficient()

Getter for DragCoefficient

    [Obsolete("GetLinearStiffness is deprecated. Use the LinearStiffness property instead.")]
    public float GetLinearStiffness()

Getter for LinearStiffness

    [Obsolete("GetParentCollisionIgnore is deprecated. Use the ParentCollisionIgnore property instead.")]
    public NodePath GetParentCollisionIgnore()

Getter for ParentCollisionIgnore

    [Obsolete("GetPoseMatchingCoefficient is deprecated. Use the PoseMatchingCoefficient property instead.")]
    public float GetPoseMatchingCoefficient()

Getter for PoseMatchingCoefficient

    [Obsolete("GetPressureCoefficient is deprecated. Use the PressureCoefficient property instead.")]
    public float GetPressureCoefficient()

Getter for PressureCoefficient

    [Obsolete("GetSimulationPrecision is deprecated. Use the SimulationPrecision property instead.")]
    public int GetSimulationPrecision()

Getter for SimulationPrecision

    [Obsolete("GetTotalMass is deprecated. Use the TotalMass property instead.")]
    public float GetTotalMass()

Getter for TotalMass

    [Obsolete("GetVolumeStiffness is deprecated. Use the VolumeStiffness property instead.")]
    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.

    [Obsolete("SetAreaAngularStiffness is deprecated. Use the AreaAngularStiffness property instead.")]
    public void SetAreaAngularStiffness(float areaAngularStiffness)

Setter for AreaAngularStiffness

    [Obsolete("SetCollisionLayer is deprecated. Use the CollisionLayer property instead.")]
    public void SetCollisionLayer(uint 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.

    [Obsolete("SetCollisionMask is deprecated. Use the CollisionMask property instead.")]
    public void SetCollisionMask(uint 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.

    [Obsolete("SetDampingCoefficient is deprecated. Use the DampingCoefficient property instead.")]
    public void SetDampingCoefficient(float dampingCoefficient)

Setter for DampingCoefficient

    [Obsolete("SetDragCoefficient is deprecated. Use the DragCoefficient property instead.")]
    public void SetDragCoefficient(float dragCoefficient)

Setter for DragCoefficient

    [Obsolete("SetLinearStiffness is deprecated. Use the LinearStiffness property instead.")]
    public void SetLinearStiffness(float linearStiffness)

Setter for LinearStiffness

    [Obsolete("SetParentCollisionIgnore is deprecated. Use the ParentCollisionIgnore property instead.")]
    public void SetParentCollisionIgnore(NodePath parentCollisionIgnore)

Setter for ParentCollisionIgnore

    [Obsolete("SetPoseMatchingCoefficient is deprecated. Use the PoseMatchingCoefficient property instead.")]
    public void SetPoseMatchingCoefficient(float poseMatchingCoefficient)

Setter for PoseMatchingCoefficient

    [Obsolete("SetPressureCoefficient is deprecated. Use the PressureCoefficient property instead.")]
    public void SetPressureCoefficient(float pressureCoefficient)

Setter for PressureCoefficient

    public void SetRayPickable(bool rayPickable)

    [Obsolete("SetSimulationPrecision is deprecated. Use the SimulationPrecision property instead.")]
    public void SetSimulationPrecision(int simulationPrecision)

Setter for SimulationPrecision

    [Obsolete("SetTotalMass is deprecated. Use the TotalMass property instead.")]
    public void SetTotalMass(float mass)

Setter for TotalMass

    [Obsolete("SetVolumeStiffness is deprecated. Use the VolumeStiffness property instead.")]
    public void SetVolumeStiffness(float volumeStiffness)

Setter for VolumeStiffness

Tags: