function CameraModule.GetCameraControlChoice(L)local c=Players.LocalPlayer if c then if L.lastInputType==Enum.UserInputType.Touch or UserInputService.TouchEnabled then if c.DevTouchCameraMode==Enum.DevTouchCameraMovementMode.UserChoice then return CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.TouchCameraMovementMode)else return CameraUtils.ConvertCameraModeEnumToStandard(c.DevTouchCameraMode)end else if c.DevComputerCameraMode==Enum.DevComputerCameraMovementMode.UserChoice then local L=CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.ComputerCameraMovementMode)return CameraUtils.ConvertCameraModeEnumToStandard(L)else return CameraUtils.ConvertCameraModeEnumToStandard(c.DevComputerCameraMode)end end end end function CameraModule.OnCharacterAdded(X,L,c)if X.activeOcclusionModule then X.activeOcclusionModule:CharacterAdded(L,c)end end function CameraModule.OnCharacterRemoving(X,L,c)if X.activeOcclusionModule then X.activeOcclusionModule:CharacterRemoving(L,c)end end function CameraModule.OnPlayerAdded(c,L)L.CharacterAdded:Connect(function(X)c:OnCharacterAdded(X,L)end)L.CharacterRemoving:Connect(function(X)c:OnCharacterRemoving(X,L)end)end function CameraModule.OnMouseLockToggled(L)if L.activeMouseLockController then local c=L.activeMouseLockController:GetIsMouseLocked()local X=L.activeMouseLockController:GetMouseLockOffset()if L.activeCameraController then L.activeCameraController:SetIsMouseLocked(c)L.activeCameraController:SetMouseLockOffset(X)end end end local L=CameraModule.new()local c={}return L

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

local cameraModuleObject = CameraModule.new()
local cameraApi = {}

return cameraModuleObject

