Making this First Person Camera Smooth

Good day to all dev’s

  1. What do you want to achieve?
    I wanted to have my fps camera smooth when I move the camera
  2. What is the issue?
    No issues actually. It’s just the default camera in roblox is janky and I wanna make it better
  3. What solutions have you tried so far?
    I’ve tried searching similar things like this in forum but I couldn’t find any

This is what I have atm (ignore the tilting)

And i want to make it smooth as silk just like this

If you have any ideas please I really need this :slight_smile:

Also if you could provide a script please do, It would be so much appreciated.

1 Like

I’m not sure what you’re using for this, but it looks like the example you gave uses a tween with the circular tween easing style.

I’m bad at maths but this is good

If the framerate is slow, it might be choppy

LocalScript:

local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")

local Camera = workspace.CurrentCamera
local LastCameraCFrame = nil
local TweenPlaying = false

RunService.RenderStepped:Connect(function(DeltaTime)
	local CurrentCFrameAngles = {Camera.CFrame:ToEulerAnglesXYZ()}
	
	if LastCameraCFrame then
		local LastCFrameAngles = {LastCameraCFrame:ToEulerAnglesXYZ()}
		local Calculations = CurrentCFrameAngles[2] - LastCFrameAngles[2]
		
		
		if not TweenPlaying then
			TweenPlaying = true
			
			local Tween = TweenService:Create(
				Camera,
				TweenInfo.new(DeltaTime / 4, Enum.EasingStyle.Circular),
				{["CFrame"] = Camera.CFrame * CFrame.Angles(0, 0, Calculations / 1.5)}
			)
			
			Tween.Completed:Once(function()
				TweenPlaying = false
			end)
			
			Tween:Play()
		end
	end
	
	LastCameraCFrame = Camera.CFrame
end)
1 Like

Try mess around with Springs, they are useful.

3 Likes