Helper classes
The node is split into a few small classes. You normally only touch SoftBody2D; these are here for scripts that want more.
SoftBody2DPhysics
Static wrapper around the extra APIs of Godot Rapier Physics, called through ClassDB.class_call_static so there is no hard dependency on the extension. Every call is a no-op (returns zero) without Rapier.
| Method | Description |
|---|---|
has_rapier() -> bool | Rapier is installed and selected as the 2D physics engine. Cached. |
joint_reaction_impulse(joint: Joint2D) -> Vector2 | Linear impulse the joint applied last step; divide by the step delta for a force. |
joint_reaction_angular_impulse(joint: Joint2D) -> float | Angular impulse the joint applied last step. |
joint_set_softness(joint, natural_frequency, damping_ratio) | Make a joint compliant. |
joint_set_enabled(joint, enabled) | Enable or disable a joint without freeing it. |
body_max_contact_impulse(body: PhysicsBody2D) -> float | Strongest contact impulse on a body last step. |
body_set_extra_param(body, param: BodyParam, value) | CONTACT_SKIN, DOMINANCE, SOFT_CCD, MASSLESS, ADDITIONAL_SOLVER_ITERATIONS. |
SoftBody2DRigidBody
Extend your rigidbody_scene root from this to get signal rigidbody_created(collision_shape: CollisionShape2D, is_center: bool) when the softbody builds it.
Voronoi2D
The region grid generator, also usable as a standalone node that draws its regions: set size, type and distance_between_points, then click Bake.