- constexpr float k = 1.0f; // spring constant
- constexpr float b = 1.0f; // damper constant
- constexpr float t = 0.01f; // 1/time constant
- const glm::vec3 x(-entity.TargetVelocity()); // endpoint displacement from equilibrium
- const glm::vec3 v(state.velocity); // relative velocity between endpoints
- return (((-k) * x) - (b * v)) * t; // times mass = 1
+ constexpr float k = 10.0f; // spring constant
+ constexpr float b = 10.0f; // damper constant
+ const glm::vec3 x(-entity.TargetVelocity()); // endpoint displacement from equilibrium, by 1s, in m
+ const glm::vec3 v(state.velocity); // relative velocity between endpoints in m/s
+ return ((-k) * x) - (b * v); // times 1kg/s, in kg*m/s²