function CameraModule.Update(e,x)if e.activeCameraController then e.activeCameraController:UpdateMouseBehavior()local P,S=e.activeCameraController:Update(x)e.activeCameraController:ApplyVRTransform()if e.activeOcclusionModule then P,S=e.activeOcclusionModule:Update(x,P,S)end game.Workspace.CurrentCamera.CFrame=P game.Workspace.CurrentCamera.Focus=S if e.activeTransparencyController then e.activeTransparencyController:Update()end if CameraInput.getInputEnabled()then CameraInput.resetInputForFrameEnd()end end end
--[[
	Main RenderStep Update. The camera controller and occlusion module both have opportunities
	to set and modify (respectively) the CFrame and Focus before it is set once on CurrentCamera.
	The camera and occlusion modules should only return CFrames, not set the CFrame property of
	CurrentCamera directly.
--]]
function CameraModule:Update(dt)
	if self.activeCameraController then
		self.activeCameraController:UpdateMouseBehavior()

		local newCameraCFrame, newCameraFocus = self.activeCameraController:Update(dt)
		self.activeCameraController:ApplyVRTransform()
		if self.activeOcclusionModule then
			newCameraCFrame, newCameraFocus = self.activeOcclusionModule:Update(dt, newCameraCFrame, newCameraFocus)
		end

		-- Here is where the new CFrame and Focus are set for this render frame
		game.Workspace.CurrentCamera.CFrame = newCameraCFrame
		game.Workspace.CurrentCamera.Focus = newCameraFocus

		-- Update to character local transparency as needed based on camera-to-subject distance
		if self.activeTransparencyController then
			self.activeTransparencyController:Update()
		end

		if CameraInput.getInputEnabled() then
			CameraInput.resetInputForFrameEnd()
		end
	end
end
