Struct SoftBody

A soft mesh physics body.

struct SoftBody ;

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

Properties

NameTypeDescription
areaangularStiffness[get, set] double
collisionLayer[get, set] longThe physics layers this SoftBody 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.
collisionMask[get, set] longThe physics layers this SoftBody scans for collisions.
dampingCoefficient[get, set] double
dragCoefficient[get, set] double
linearStiffness[get, set] double
parentCollisionIgnore[get, set] NodePathNodePath to a CollisionObject this SoftBody should avoid clipping.
poseMatchingCoefficient[get, set] double
pressureCoefficient[get, set] double
rayPickable[get, set] boolIf true, the SoftBody will respond to RayCasts.
simulationPrecision[get, set] longIncreasing this value will improve the resulting simulation, but can affect performance. Use with care.
totalMass[get, set] doubleThe SoftBody's mass.
volumeStiffness[get, set] double

Methods

NameDescription
_drawSoftMesh
addCollisionExceptionWith Adds a body to the list of bodies that this body can't collide with.
getAreaangularStiffness
getCollisionExceptions Returns an array of nodes that were added as collision exceptions for this body.
getCollisionLayer
getCollisionLayerBit Returns an individual bit on the collision mask.
getCollisionMask
getCollisionMaskBit Returns an individual bit on the collision mask.
getDampingCoefficient
getDragCoefficient
getLinearStiffness
getParentCollisionIgnore
getPoseMatchingCoefficient
getPressureCoefficient
getSimulationPrecision
getTotalMass
getVolumeStiffness
isRayPickable
removeCollisionExceptionWith Removes a body from the list of bodies that this body can't collide with.
setAreaangularStiffness
setCollisionLayer
setCollisionLayerBit Sets individual bits on the layer mask. Use this if you only need to change one layer's value.
setCollisionMask
setCollisionMaskBit Sets individual bits on the collision mask. Use this if you only need to change one layer's value.
setDampingCoefficient
setDragCoefficient
setLinearStiffness
setParentCollisionIgnore
setPoseMatchingCoefficient
setPressureCoefficient
setRayPickable
setSimulationPrecision
setTotalMass
setVolumeStiffness