local V local S;(camera:GetPropertyChangedSignal("\067\097\109\101\114\097\083\117\098\106\101\099\116")):Connect(function()local V=camera.CameraSubject if V:IsA("\072\117\109\097\110\111\105\100")then S=V.RootPart elseif V:IsA("\066\097\115\101\080\097\114\116")then S=V else S=nil end end)local function W(S)if FFlagUserPoppercamLooseOpacityThreshold then return getTotalTransparency(S)<.25 and(S.CanCollide and(V~=(S:GetRootPart()or S)and not S:IsA("\084\114\117\115\115\080\097\114\116")))else return S.Transparency<.95 and(S.CanCollide and V~=(S:GetRootPart()or S))end end
--------------------------------------------------------------------------------------------
-- Popper uses the level geometry find an upper bound on subject-to-camera distance.
--
-- Hard limits are applied immediately and unconditionally. They're generally caused
-- when level geometry intersects with the near plane (with exceptions, see below).
--
-- Soft limits are only applied under certain conditions.
-- They're caused when level geometry occludes the subject without actually intersecting
-- with the near plane at the target distance.
--
-- Soft limits can be promoted to hard limits and hard limits can be demoted to soft limits.
-- We usually don't want the latter to happen.
--
-- A soft limit will be promoted to a hard limit if an obstruction
-- lies between the current and target camera positions.
--------------------------------------------------------------------------------------------

local subjectRoot
local subjectPart

camera:GetPropertyChangedSignal("CameraSubject"):Connect(function()
	local subject = camera.CameraSubject
	if subject:IsA("Humanoid") then
		subjectPart = subject.RootPart
	elseif subject:IsA("BasePart") then
		subjectPart = subject
	else
		subjectPart = nil
	end
end)

local function canOcclude(part)
	-- Occluders must be:
	-- 1. Opaque
	-- 2. Interactable
	-- 3. Not in the same assembly as the subject

	if FFlagUserPoppercamLooseOpacityThreshold then
		return getTotalTransparency(part) < 0.25
			and part.CanCollide
			and subjectRoot ~= (part:GetRootPart() or part)
			and not part:IsA("TrussPart")
	else
		return part.Transparency < 0.95 and part.CanCollide and subjectRoot ~= (part:GetRootPart() or part)
	end
end
