The factor (stiffness) of the spring. I recomment a value around 100 or 1000.
The ratio (damping) of the spring. 1.0 == critical damping.
The target value of the spring. You usually want to set this value to control the spring.
The current value of the spring.
The current velocity of the spring.
The implementation of Critical Damped Spring (CDS).
This is the very naive implementation. No
deltaTimeclamping or sub-stepping. You may want to do such improvement yourself if you need this to be more robust.Shoutouts to Keijiro Takahashi