SliderJoint:setMotorSpring

Edit

Sets the spring parameters of the motor target. These are similar to the spring parameters set by SldierJoint:setSpring, but they apply to the motor when it reaches its target instead of the position limits of the slider joint. Note that these only take effect when the motor mode is position.

SliderJoint:setMotorSpring(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

See SldierJoint:setSpring for more detailed info on how the spring parameters work.

See also