--		if EnabledCamera and EnabledCamera:GetShiftLock() and not EnabledCamera:IsInFirstPerson() then
--			if EnabledCamera:GetCameraActualZoom() < 1 then
--				local subjectPosition = EnabledCamera.lastSubjectPosition 
--				if subjectPosition then
--					Camera.Focus = CFrame_new(subjectPosition)
--					Camera.CFrame = CFrame_new(subjectPosition - MIN_CAMERA_ZOOM*EnabledCamera:GetCameraLook(), subjectPosition)
--				end
--			end
--		end

		return newCameraCFrame, desiredCameraFocus
	end
	
	-- Return unchanged values
	return desiredCameraCFrame, desiredCameraFocus
end

function Poppercam:OnCameraSubjectChanged(newSubject)
	self.vehicleParts = {}

	self.lastPopAmount = 0

	if newSubject then
		-- Determine if we should be popping at all
		self.popperEnabled = false
		for _, subjectType in pairs(VALID_SUBJECTS) do
			if newSubject:IsA(subjectType) then
				self.popperEnabled = true
				break
			end
		end

		-- Get all parts of the vehicle the player is controlling
		if newSubject:IsA('VehicleSeat') then
			self.vehicleParts = newSubject:GetConnectedParts(true)
		end
	
		if FFlagUserPortraitPopperFix then
			if newSubject:IsA("BasePart") then
				self.subjectPart = newSubject
			elseif newSubject:IsA("Model") then
				if newSubject.PrimaryPart then
					self.subjectPart = newSubject.PrimaryPart
				else
					-- Model has no PrimaryPart set, just use first BasePart
					-- we can find as better-than-nothing solution (can still fail)
					for _, child in pairs(newSubject:GetChildren()) do
						if child:IsA("BasePart") then
							self.subjectPart = child
							break
						end
					end	
				end
			elseif newSubject:IsA("Humanoid") then
				self.subjectPart = newSubject.RootPart
  			end
  		end
  	end
end

return Poppercam
