How is Damping manipulated for SpringConstraints?

I’m trying to calculate the motion of spring constraints with harmonic motion equations. I’ve been able to pretty accurately calculate how many oscillations and for how long the motion continues for a given mass, stiffness and damping. The only issue is that it seems that Roblox scales the damping value in some way.

This is a graph of the spring’s motion for the system I’m testing. k = Stiffness, m = mass, A = amplitude (in studs), B = damping. I can plug in these values directly from studio for all the parameters except for B. Damping has to be divided by about 10 before I can set it for B.

This works fine for my current testing situation but I don’t want any errors in my approximation to compound for other systems. I’m hoping a Roblox engineer or someone else who’s knowledgeable in this could tell me how Roblox is manipulating this value. Thanks!

Probably due to smaller timestep of 240 hz explicit integration. The equation you are using is the exact solution to springs.

There will be errors and less dampening. Qualitatively you can observe this with the default roblox jeep at low fps which should become real bouncy.

1 Like

I figured it out, my equation was slightly incorrect it should have been
image

With this equation I’m able to exactly predict the position of the spring without needing any scaling of damping

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.