function CameraModule.OnCameraSubjectChanged(l)local s=workspace.CurrentCamera local b=s and s.CameraSubject if l.activeTransparencyController then l.activeTransparencyController:SetSubject(b)end if l.activeOcclusionModule then l.activeOcclusionModule:OnCameraSubjectChanged(b)end l:ActivateCameraController(nil,s.CameraType)end function CameraModule.OnCameraTypeChanged(s,l)if l==Enum.CameraType.Scriptable then if UserInputService.MouseBehavior==Enum.MouseBehavior.LockCenter then UserInputService.MouseBehavior=Enum.MouseBehavior.Default end end s:ActivateCameraController(nil,l)end

function CameraModule:OnCameraSubjectChanged()
	local camera = workspace.CurrentCamera
	local cameraSubject = camera and camera.CameraSubject

	if self.activeTransparencyController then
		self.activeTransparencyController:SetSubject(cameraSubject)
	end

	if self.activeOcclusionModule then
		self.activeOcclusionModule:OnCameraSubjectChanged(cameraSubject)
	end

	self:ActivateCameraController(nil, camera.CameraType)
end

function CameraModule:OnCameraTypeChanged(newCameraType)
	if newCameraType == Enum.CameraType.Scriptable then
		if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then
			UserInputService.MouseBehavior = Enum.MouseBehavior.Default
		end
	end

	-- Forward the change to ActivateCameraController to handle
	self:ActivateCameraController(nil, newCameraType)
end
