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

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
