Hi, I’ve been making a spring camera. It was being jittery so I found a solution and it looks like:
local physicsStep = 0
RunService:BindToRenderStep("Camera", 200, function(deltaTime)
if localPlayer.Character then
cameraSpring.goal = localPlayer.Character.HumanoidRootPart.Position + Vector3.new(0, math.tan(math.rad(CAMERA_ANGLE)) * distance, distance)
cameraSpring:Step(physicsStep)
camera.CFrame = CFrame.new(cameraSpring.position) * CFrame.Angles(math.rad(-CAMERA_ANGLE), 0, 0)
end
end)
task.spawn(function()
while task.wait() do
physicsStep = RunService.RenderStepped:Wait()
end
end)
But, to me, it seems a little hacky is there a better solution than this or a better way to get the physics time step? It also seems very unreliable with sometimes using delta time being less jittery than it.