local s=require(script.Parent:WaitForChild("\066\097\115\101\067\097\109\101\114\097"))local P=setmetatable({},s)P.__index=P function P.new()local m=setmetatable(s.new(),P)m.isFollowCamera=false m.isCameraToggle=false m.lastUpdate=tick()m.cameraToggleSpring=Util.Spring.new(5,0)return m end function P.GetCameraToggleOffset(P,s)assert(FFlagUserCameraToggle)if P.isCameraToggle then local m=P.currentSubjectDistance if CameraInput.getTogglePan()then P.cameraToggleSpring.goal=math.clamp(Util.map(m,.5,P.FIRST_PERSON_DISTANCE_THRESHOLD,0,1),0,1)else P.cameraToggleSpring.goal=0 end local T=math.clamp(Util.map(m,.5,64,0,1),0,1)+1 return Vector3.new(0,P.cameraToggleSpring:step(s)*T,0)end return Vector3.new()end
--[[ The Module ]]
--
local BaseCamera = require(script.Parent:WaitForChild("BaseCamera"))
local ClassicCamera = setmetatable({}, BaseCamera)
ClassicCamera.__index = ClassicCamera

function ClassicCamera.new()
	local self = setmetatable(BaseCamera.new(), ClassicCamera)

	self.isFollowCamera = false
	self.isCameraToggle = false
	self.lastUpdate = tick()
	self.cameraToggleSpring = Util.Spring.new(5, 0)

	return self
end

function ClassicCamera:GetCameraToggleOffset(dt)
	assert(FFlagUserCameraToggle)

	if self.isCameraToggle then
		local zoom = self.currentSubjectDistance

		if CameraInput.getTogglePan() then
			self.cameraToggleSpring.goal =
				math.clamp(Util.map(zoom, 0.5, self.FIRST_PERSON_DISTANCE_THRESHOLD, 0, 1), 0, 1)
		else
			self.cameraToggleSpring.goal = 0
		end

		local distanceOffset = math.clamp(Util.map(zoom, 0.5, 64, 0, 1), 0, 1) + 1
		return Vector3.new(0, self.cameraToggleSpring:step(dt) * distanceOffset, 0)
	end

	return Vector3.new()
end
