How to fix RenderStepped issue with max fps?

Why? when i change max fps in roblox settings to 240 fps my local systems using rendering are so fast - so slow?

already fixed.

How to fix this issue? (sry for my bad english)

2 Likes

You’re doing something like:

XOffset = lerp(XOffset, xMovement * Sensitivity, math.pow(0.05, 1.5))
ZOffset = lerp(ZOffset, zMovement * ZSensitivity, math.pow(0.05, 1.5))

While the lerp factor doesn’t take into account of how much the frame time took to complete.

RunService:BindToRenderStep("MoveCamera", Enum.RenderPriority.Camera.Value, function(deltaTime)

Use the deltaTime parameter bindToRenderStep provides.

Now you can determine how much to lerp based on the last frame time.

local alpha = math.pow(0.95, 1.5) * deltaTime -- example, adjust as needed.
XOffset = lerp(XOffset, xMovement * Sensitivity, alpha)

localMovement variable may also be incompatible with this approach.
I’m not sure why you’re dividing by 16, though if it is to make it move slower for 60fps scenarios, you may want to adjust that with this approach too.

1 Like

thank you so much, it’s working correctly! I already tried to do the same as you told me “use deltatime”, but for some reason it didn’t work for me :sweat_smile:

1 Like