local Q=require(baseCameraModule)Q.UpCFrame=IDENTITYCF function Q.UpdateUpCFrame(c,Q)c.UpCFrame=Q end function Q.CalculateNewLookCFrame(c,Q)local k=Q or c:GetCameraLookVector()k=c.UpCFrame:VectorToObjectSpace(k)local s=math.asin(k.y)local i=math.clamp(c.rotateInput.y,-MAX_Y+s,-MIN_Y+s)local K=Vector2.new(c.rotateInput.x,i)local r=CFrame.new(ZERO,k)local e=(CFrame.Angles(0,-K.x,0)*r)*CFrame.Angles(-K.y,0,0)return e end
-- BaseCamera mod

local BaseCamera = require(baseCameraModule)

BaseCamera.UpCFrame = IDENTITYCF

function BaseCamera:UpdateUpCFrame(cf)
	self.UpCFrame = cf
end

function BaseCamera:CalculateNewLookCFrame(suppliedLookVector)
	local currLookVector = suppliedLookVector or self:GetCameraLookVector()
	currLookVector = self.UpCFrame:VectorToObjectSpace(currLookVector)

	local currPitchAngle = math.asin(currLookVector.y)
	local yTheta = math.clamp(self.rotateInput.y, -MAX_Y + currPitchAngle, -MIN_Y + currPitchAngle)
	local constrainedRotateInput = Vector2.new(self.rotateInput.x, yTheta)
	local startCFrame = CFrame.new(ZERO, currLookVector)
	local newLookCFrame = CFrame.Angles(0, -constrainedRotateInput.x, 0)
		* startCFrame
		* CFrame.Angles(-constrainedRotateInput.y, 0, 0)

	return newLookCFrame
end
