Linear Spring

From Fancade Wiki
Linear Spring
Linear Spring.png
TypeScript block
ColliderNone
FolderPhysics
Ports
Inputs Before
Constraint
Stiffness
Damping
Outputs After

Makes the constraint springy, like a car's suspension.

  • Stiffness: A vector value. Determines the amount of force that that will be used to "spring" the objects towards their original positions.
  • Damping: A vector value. Acts as a kind of "drag" so that objects will not spring continually.

Notes

Before this script will function as expected, a Linear Limits constraint must be applied to the same constraint. The linear limits constraint is necessary because it stores the upper and lower limits between which the objects can move. Adding a linear spring script makes the objects "spring" between these upper and lower limits.

Examples

To find the perfect "stiffness" and "damping" values for your game, try copying the ones below and then adjust them until you get the results you were looking for.

Example

Related