Hi Adam, this expression on the position keyframes seems to do it:
marginRight = 1720;
precomp1=thisComp.layer("right");
txt1=precomp1.source.layer("title");
sr1=txt1.sourceRectAtTime();
precomp2 =thisComp.layer("titre droit");
txt2 = precomp2.source.layer("day time");
sr2=txt2.sourceRectAtTime();
offset1 = parent.fromComp(
precomp1.toComp(
txt1.toComp(
[sr1.left+sr1.width, sr1.top+sr1.height]
),2
),2
) - parent.fromComp([marginRight,0]);
offset1[1]=0;
offset2 = parent.fromComp(
precomp2.toComp(
txt2.toComp(
[sr2.left+sr2.width, sr2.top+sr2.height]
),8
),8
) - parent.fromComp([marginRight,0]);
offset2[1]=0;
p1=key(1).value;
p2=key(2).value;
p3=key(4).value;
p4=key(6).value;
if (time<key(2).time) {
linear(value[0],p1[0],p2[0],p2-offset1,p1);
} else if (time<key(4).time) {
linear(value[0],p2[0],p3[0],p2-offset1,p3-offset2);
} else {
linear(value[0],p3[0],p4[0],p3-offset2,p4);
}
I tested it with a number of different titles and it seems to work ok, but let me know if you run into an edge case where it doesn’t perform as expected.