Lerps aren't consistent across different framerates

My game primarily uses Lerps for animations, they look just fine at the target fps, but when running at something like 60fps they become alot slower.

Everything that uses lerp has alpha calculated like this: alpha * delta_calc

delta_calc is this function:

function bf.calcDelta(DeltaTime, Framerate)
	return clamp(DeltaTime * Framerate, .001, 2) 
end

The framerate argument is mainly just a multiplier.

example of the issue: (video might be loud)

What i would try is if you use the runservice for it, use .heartbeat instead of render stepped and math.clamp the framerate to 30-60 and speed it up a bit

I may misunderstand what FrameRate is in this context, but generally with a delta time you already have frame rate information. So FrameRate in this context should only be a constant multiplier.

dt is basically 1/framerate for all practical purposes, so multiplying framerate * dt would cancel out since 1*framerate/framerate = 1. Instead just multiply dt by what you are scaling directly (basically remove the * framerate)

If the frame rate is not actually the frame rate, but a constant or multiplier you should probably rename it. And to help further we probably need an example of you using this function in a lerp.

I will note if possible, don’t use delta time, but instead use start and stop measured times to calculate alpha because you don’t add potential timing errors per frame that way, but the actual issue here may be negligible since we are talking incredibly small numbers only being added (in terms of loss), not multiplied.

I’m currently using heartbeat, also the framerate is a constant on the client
image

The framerate is mainly just a multiplier, it’s a constant variable that never gets changed during runtime