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

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()

return cameraModuleObject
