Linear Spring: Difference between revisions

From Fancade Wiki
(Updated the page)
m (Link relevant articles and article that exists)
 
Line 9: Line 9:
|output1={{Port|e|After}}
|output1={{Port|e|After}}
}}
}}
Makes the constraint springy, like a car's suspension.
 
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.
* Stiffness: A vector value. Determines the amount of force that that will be used to "spring" the objects towards their original positions.
Line 24: Line 25:
{{Image|Linear spring example.png|Example}}
{{Image|Linear spring example.png|Example}}


== Related ==
* [[Add Constraint]]
* [[Linear Limits]]
* [[Linear Motor]]
* [[Angular Spring]]


[[Category:Blocks]]
[[Category:Blocks]]

Latest revision as of 12:26, 29 July 2025

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