Hi I am working on a camera peeking / tilt system, but I am a little unsatisfied with my results
This is my progress at the moment
As you can see when the camera is done tilting it abruptly stops, I want to change this so it can smoothly stop, how would I do this?
This is the script that manages the camera tilt
game:GetService("RunService").RenderStepped:Connect(function()
if Q == true then
Val = math.clamp(Val + 0.75,0,10)
Camera.CFrame = Camera.CFrame * CFrame.Angles(0,0,math.rad(Val))
end
if E == true then
Val = math.clamp(Val - 0.75,-10,0)
Camera.CFrame = Camera.CFrame * CFrame.Angles(0,0,math.rad(Val))
end
if Tilting == false then
Val = Val / 1.1
Camera.CFrame = Camera.CFrame * CFrame.Angles(0,0,math.rad(Val))
end
end)