Spring

*Este conteúdo estará disponível no idioma selecionado em breve.

A SpringConstraint applies a force on its attachments based on spring and damper behavior. You can customize a spring's damping and stiffness, as well as set minimum and maximum limits on the spring's length.

Free Length

FreeLength defines the natural resting length of the spring. If the attachments are further apart than the free length, they are forced together; if the attachments are closer together than the free length, they are forced apart.

Damping

The Damping value controls how fast the spring's oscillation dies down. A value of 0 allows the spring to oscillate endlessly, while higher values bring the spring to a rest more quickly.

Stiffness

Stiffness sets the strength of the spring. Higher values create a spring that responds with more force when its attachments are closer together or further apart than FreeLength.

Stiffness = 25
Stiffness = 500

Limits

Enabling the LimitsEnabled property exposes the MinLength and MaxLength values for setting the minimum and maximum length of the spring. If the spring's attachments reach these limits, they stop moving apart from one another without restitution.