Camera sensitivity too high when zoomed in

I have a script that adjusts your FOV when you scroll in/out, but when you zoom in really far, the camera movement begins to get sensitive and hard to control. I’d like to make the camera smoother and more controllable at maximum zoom distance.


(youtube link if that video doesn’t work)

This is my script:

local ts = game:GetService("TweenService")
local plrs = game:GetService("Players")
local uis = game:GetService("UserInputService")
local plr = plrs.LocalPlayer
local cam = workspace.CurrentCamera

local nextfov = cam.FieldOfView
uis.InputChanged:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseWheel then
		if input.Position.Z > 0 then
			if cam.FieldOfView > 10 then
				nextfov -= 10
				ts:Create(cam, TweenInfo.new(0.4,1,2), {FieldOfView = nextfov}):Play()
			end
		elseif input.Position.Z < 0 then
			if cam.FieldOfView < 70 then
				nextfov += 10
				ts:Create(cam, TweenInfo.new(0.4,1,2), {FieldOfView = nextfov}):Play()
			end
		end
	end
end)

Additionally, the method I am using for zooming in/out isn’t efficient, since it sometimes locks in an FOV and I have to spam scroll to get it to unlock. That could use some help too, but not the priority.

1 Like

For my game I lowered the player’s sensitivity to make it easier to look around when zoomed in:

local UIS = game:GetService("UserInputService")
local UGS = UserSettings():GetService("UserGameSettings")

TS:Create(UIS, TI, {MouseDeltaSensitivity = 0.1  / UGS.MouseSensitivity}) -- slow down
TS:Create(UIS, TI, {MouseDeltaSensitivity = 1}) -- speed up
1 Like

How would I go about implementing that into my script?

1 Like

Could make a variable named “nextSensitivity” and then change it like you did with your “nextfov” variable. I gave the exact same tweens that I used which you can use as a template.

1 Like

Cool, that worked very well in my script.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.