HingeJoint:setSpring

Edit

Sets the spring parameters of the HingeJoint. Use this to make the angle limits of the hinge "soft". When the motor is active, a separate set of spring parameters can be set on the motor, see HingeJoint:setMotorSpring.

HingeJoint:setSpring(frequency, damping)

Arguments

NameTypeDefaultDescription
frequencynumber0.0 The frequency of the spring, in hertz. Higher frequencies make the spring more stiff. When zero, the spring is disabled.
dampingnumber1.0 The damping ratio of the spring.

Returns

Nothing

Notes

Higher frequencies make the spring more stiff. When zero (the default), the spring is disabled and the limits will be as stiff as possible.

The damping ratio controls how quickly the oscillation slows down:

See also