function CameraModule.GetCameraControlChoice(K)local L=Players.LocalPlayer if L then if K.lastInputType==Enum.UserInputType.Touch or UserInputService.TouchEnabled then if L.DevTouchCameraMode==Enum.DevTouchCameraMovementMode.UserChoice then return CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.TouchCameraMovementMode)else return CameraUtils.ConvertCameraModeEnumToStandard(L.DevTouchCameraMode)end else if L.DevComputerCameraMode==Enum.DevComputerCameraMovementMode.UserChoice then local K=CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.ComputerCameraMovementMode)return CameraUtils.ConvertCameraModeEnumToStandard(K)else return CameraUtils.ConvertCameraModeEnumToStandard(L.DevComputerCameraMode)end end end end function CameraModule.OnCharacterAdded(M,K,L)if M.activeOcclusionModule then M.activeOcclusionModule:CharacterAdded(K,L)end end function CameraModule.OnCharacterRemoving(M,K,L)if M.activeOcclusionModule then M.activeOcclusionModule:CharacterRemoving(K,L)end end function CameraModule.OnPlayerAdded(L,K)K.CharacterAdded:Connect(function(M)L:OnCharacterAdded(M,K)end)K.CharacterRemoving:Connect(function(M)L:OnCharacterRemoving(M,K)end)end function CameraModule.OnMouseLockToggled(K)if K.activeMouseLockController then local L=K.activeMouseLockController:GetIsMouseLocked()local M=K.activeMouseLockController:GetMouseLockOffset()if K.activeCameraController then K.activeCameraController:SetIsMouseLocked(L)K.activeCameraController:SetMouseLockOffset(M)end end end return CameraModule.new()
-- Formerly getCurrentCameraMode, this function resolves developer and user camera control settings to
-- decide which camera control module should be instantiated. The old method of converting redundant enum types
function CameraModule:GetCameraControlChoice()
	local player = Players.LocalPlayer

	if player then
		if self.lastInputType == Enum.UserInputType.Touch or UserInputService.TouchEnabled then
			-- Touch
			if player.DevTouchCameraMode == Enum.DevTouchCameraMovementMode.UserChoice then
				return CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.TouchCameraMovementMode)
			else
				return CameraUtils.ConvertCameraModeEnumToStandard(player.DevTouchCameraMode)
			end
		else
			-- Computer
			if player.DevComputerCameraMode == Enum.DevComputerCameraMovementMode.UserChoice then
				local computerMovementMode =
					CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.ComputerCameraMovementMode)
				return CameraUtils.ConvertCameraModeEnumToStandard(computerMovementMode)
			else
				return CameraUtils.ConvertCameraModeEnumToStandard(player.DevComputerCameraMode)
			end
		end
	end
end

function CameraModule:OnCharacterAdded(char, player)
	if self.activeOcclusionModule then
		self.activeOcclusionModule:CharacterAdded(char, player)
	end
end

function CameraModule:OnCharacterRemoving(char, player)
	if self.activeOcclusionModule then
		self.activeOcclusionModule:CharacterRemoving(char, player)
	end
end

function CameraModule:OnPlayerAdded(player)
	player.CharacterAdded:Connect(function(char)
		self:OnCharacterAdded(char, player)
	end)
	player.CharacterRemoving:Connect(function(char)
		self:OnCharacterRemoving(char, player)
	end)
end

function CameraModule:OnMouseLockToggled()
	if self.activeMouseLockController then
		local mouseLocked = self.activeMouseLockController:GetIsMouseLocked()
		local mouseLockOffset = self.activeMouseLockController:GetMouseLockOffset()
		if self.activeCameraController then
			self.activeCameraController:SetIsMouseLocked(mouseLocked)
			self.activeCameraController:SetMouseLockOffset(mouseLockOffset)
		end
	end
end

return CameraModule.new()
