Just add camera.pan = my.pan in your
function pl_cam()