It's combining different x,y movements to generate a composite camera panning movement, but since I have my Motion Blur turned ON for the foreground and background layers, the blur gets screwed up on the last frame of each panning section because the very next value starts in a completely different x,y location and AE just smears the blur on the last frame since I can't tell AE that I'm "restarting" my panning motion, so I need to make my last keyframe value just use the same x,y value on the second to last frame of each panning section along the timeline.
var x= effect("PanZoom")("Anchor A")[0]-effect("xOffset")("Slider")+effect("shakeDelta")("Point")[0]*effect("x,y movement factor")("Slider")/100-effect("panDelta")("Point")[0]/2;
var y= effect("PanZoom")("Anchor A")[1]-effect("yOffset")("Slider")+effect("shakeDelta")("Point")[1]*effect("x,y movement factor")("Slider")/100-effect("panDelta")("Point")[1]/2;
[x, y]
I have no idea if this will affect your motion blur in the way you're hoping for, but on any frame where a keyframe exists, it should give the value of the keyframe, rather than the calculation:
x= effect("PanZoom")("Anchor A")[0]-effect("xOffset")("Slider")+effect("shakeDelta")("Point")[0]*effect("x,y movement factor")("Slider")/100-effect("panDelta")("Point")[0]/2;
y= effect("PanZoom")("Anchor A")[1]-effect("yOffset")("Slider")+effect("shakeDelta")("Point")[1]*effect("x,y movement factor")("Slider")/100-effect("panDelta")("Point")[1]/2;
val =[x, y]
if (numKeys > 0){
f = timeToFrames(nearestKey(time).time);
if (f == timeToFrames(time)) val = value;
}
val