function CameraModule.GetCameraControlChoice(b)local W=Players.LocalPlayer if W then if UserInputService:GetLastInputType()==Enum.UserInputType.Touch or UserInputService.TouchEnabled then if W.DevTouchCameraMode==Enum.DevTouchCameraMovementMode.UserChoice then return CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.TouchCameraMovementMode)else return CameraUtils.ConvertCameraModeEnumToStandard(W.DevTouchCameraMode)end else if W.DevComputerCameraMode==Enum.DevComputerCameraMovementMode.UserChoice then local b=CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.ComputerCameraMovementMode)return CameraUtils.ConvertCameraModeEnumToStandard(b)else return CameraUtils.ConvertCameraModeEnumToStandard(W.DevComputerCameraMode)end end end end function CameraModule.OnCharacterAdded(s,b,W)if s.activeOcclusionModule then s.activeOcclusionModule:CharacterAdded(b,W)end end function CameraModule.OnCharacterRemoving(s,b,W)if s.activeOcclusionModule then s.activeOcclusionModule:CharacterRemoving(b,W)end end function CameraModule.OnPlayerAdded(W,b)b.CharacterAdded:Connect(function(s)W:OnCharacterAdded(s,b)end)b.CharacterRemoving:Connect(function(s)W:OnCharacterRemoving(s,b)end)end function CameraModule.OnMouseLockToggled(b)if b.activeMouseLockController then local W=b.activeMouseLockController:GetIsMouseLocked()local s=b.activeMouseLockController:GetMouseLockOffset()if b.activeCameraController then b.activeCameraController:SetIsMouseLocked(W)b.activeCameraController:SetMouseLockOffset(s)end end end local b=CameraModule.new()return{}
-- 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 UserInputService:GetLastInputType() == 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

local cameraModuleObject = CameraModule.new()

return {}
