Skip to main content

Joints

The bodies of the softbody are held together by joints. Every body is jointed to its neighbours in the region grid (six of them inside a hexagon softbody), and by default also to the bodies two hops away. Together the joints decide how squishy the softbody is, how well it keeps its overall shape, and where it can tear.

The Joint parameters section contains options to either create PinJoint2D or DampedSpringJoint2D nodes that connect the RigidBody2D nodes together.

  • Joint Type: pin (the default, sturdier) or spring (softer). In case pin is selected, the PinJoint section applies; for spring, the DampedSpringJoint section does.

  • Bias: Godot's Joint2D.bias.

  • Disable Collision: Jointed bodies do not collide with each other. Keep it on: neighbouring shapes overlap slightly by design.

  • Joint Reach: How far joints reach, in hops. See below.

  • Yield Strain: 0 keeps the softbody elastic. Above it, a joint squeezed shorter than its rest length by more than this share is re-anchored at its current length, so a dent stays: clay rather than rubber. Stretching always springs back, so nothing can be pulled out of shape. Interior joints need Interior Strength times as much.

  • Yield Limit: the most permanent squeeze a joint may accumulate (default 0.3). Past it the joint stops yielding.

Breaking has its own page: Breaking and cutting.

Joint reach: holding the shape

With Joint Reach = 1 nothing in the lattice knows the overall shape: every joint sits at its rest length while the softbody shears, sags and stays leaned after being pushed over.

Joint Reach = 2 (the default) also joints every body to the bodies two hops away, anchored midway. Those joints resist shearing and bending while the one-hop joints keep the softbody squishy, so it comes back on its own, inside the solver, with no extra force. Reach 3 is stiffer again. Each step roughly doubles the joint count. At Softness 60, resting on a floor:

reach 1reach 2
sag under its own weight15%8%
shape error after being leaned over22 px6 px
bodies colliding with their own softbody320

Every pair is joined by one joint, parented to one of the two. Longer joints break like any other, and a body that loses its last neighbour joint drops them too.

Pin Joint Parameters

The PinJoint parameters section contains parameters related to the pin joint:

  • Softness: How far the pin gives. This is the squish: 0 makes the lattice a rigid truss, 60 (the default) is very soft, 10 to 30 is a firm jelly. Softer softbodies sag more and, at reach 1, lean over permanently.

  • Angular Limit Enabled, Angular Limit Lower, Angular Limit Upper: In degrees. They bound how far two jointed bodies may twist relative to each other, measured from how they were generated; nothing is absolute. Measured on two bodies with one of them held (Rapier, softness 60): unlimited they twist 56° apart, with ±5° exactly 5°, with ±30° exactly 30°.

    In a lattice every body already has six pins pulling on it, and the softbody deforms mostly by the pins stretching, so limits change the overall shape only a little; softness and joint reach are the knobs for that. They add up along a chain. Reliable on Rapier; less so on Godot Physics.

Spring Joint Parameters

The DampedSpringJoint parameters section contains parameters related to the spring joint:

  • Stiffness: Increase this property to make the softbody less squishy.
  • Damping: Increasing this will make the softbody reach the initial state faster, making it less loose.
  • Rest Length Ratio and Length Ratio: Control the rest length and length properties of the spring joint, as a ratio of the distance the two bodies were generated at.