Added option to either track the current frame or the previous one.