SliderJoint:getMotorSpring

Edit

Returns the spring parameters of the motor target. These are similar to the spring parameters set by SliderJoint: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.

frequency, damping = SliderJoint:getMotorSpring()

Arguments

None

Returns

NameTypeDescription
frequencynumber The frequency of the spring, in hertz. Higher frequencies make the spring more stiff. When zero, the spring is disabled.
dampingnumber The damping ratio of the spring.

Notes

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

See also