I basically have a bobbing script, that changes the camera’s offset every renderstep. I’ve seen a bunch of different things about deltatime, and how it can be used to filter things running on renderstep, so that it’s not absurdly fast like above 60fps, or too slow like below that.
here’s bob
game:GetService("RunService").RenderStepped:Connect(function(deltaTime)
local dampen = character.Damping.Value
local dist = (camera.CFrame.Position - head.Position).Magnitude
local start = 0.016 / game:GetService("RunService").RenderStepped:Wait()
local dt = start * game:GetService("RunService").RenderStepped:Wait()
if dist < 0 then
check = 1
else
check = 0
end
if walking == true then
tiick = tiick + character.SPEED.Value / 92
end
if tiick >= math.pi * 2 then
tiick = 0
end
camera.CFrame = camera.CFrame * CFrame.new(math.cos(tiick) / dampen, math.sin(tiick * 2) / (dampen * 2), check) * CFrame.Angles(0, 0, math.sin(tiick - math.pi * 1.5) / (dampen * 20) * dt * 60)
end)--my attempt at filtering with deltatime
this changed virtually nothing though. what can I do?