Hi.
I am trying to get somewhat physically correct suspension model using the b2DistanceJoint for mass-spring-damper simulation.
Given a mass resting on the joint. Running it with zero damping works great. The constraint will calculate a correction impulse that corresponds to the spring force and displacement. But things will get bad as soon as damping comes into play. It effectively reduces the impulse, the mass sinks lower with increasing damping value.
I wonder if there is a way to take this into account. To only apply damping if the velocity constraint solver is not able to reduce the relative velocity to zero?
I am trying to get somewhat physically correct suspension model using the b2DistanceJoint for mass-spring-damper simulation.
Given a mass resting on the joint. Running it with zero damping works great. The constraint will calculate a correction impulse that corresponds to the spring force and displacement. But things will get bad as soon as damping comes into play. It effectively reduces the impulse, the mass sinks lower with increasing damping value.
I wonder if there is a way to take this into account. To only apply damping if the velocity constraint solver is not able to reduce the relative velocity to zero?