- // apply force proportional to penetration
- // use velocity projected onto correction as damper
- //constexpr float k = 1000.0f; // spring constant
- //constexpr float b = 10.0f; // damper constant
- //const glm::vec3 x(-correction); // endpoint displacement from equilibrium in m
- //const glm::vec3 v(normal_velocity); // relative velocity between endpoints in m/s
- //return (((-k) * x) - (b * v)); // times 1kg/s, in kg*m/s²