|
@@ -53,6 +53,10 @@ public:
|
|
|
/// Valid when mSpringMode = ESpringMode::StiffnessAndDamping.
|
|
|
/// If mStiffness > 0 the constraint will be soft and mStiffness specifies the stiffness (k) in the spring equation F = -k * x - c * v for a linear or T = -k * theta - c * w for an angular spring.
|
|
|
/// If mStiffness <= 0, mDamping is ignored and the constraint will have hard limits (as hard as the time step / the number of velocity / position solver steps allows).
|
|
|
+ ///
|
|
|
+ /// Note that stiffness values are large numbers. To calculate a ballpark value for the needed stiffness you can use:
|
|
|
+ /// force = stiffness * delta_spring_length = mass * gravity <=> stiffness = mass * gravity / delta_spring_length.
|
|
|
+ /// So if your object weighs 1500 kg and the spring compresses by 2 meters, you need a stiffness in the order of 1500 * 9.81 / 2 ~ 7500 N/m.
|
|
|
float mStiffness;
|
|
|
};
|
|
|
|