Hi Dan! Thanks for helping me out!
I’ve adapted your expression to my needs and it seems to be correct, it should return time when layer x position is less or equal to null x position… But ae returns an error:
“Function trackValue.valueAtTime is undefined”
What am I doing wrong?
goalNull = thisComp.layer("null");
goalPos = goalNull.toWorld(goalNull.anchorPoint);
layPos = thisLayer.toWorld(thisLayer.anchorPoint);
trackValue = layPos[0]-goalPos[0];
check = false;
for (f = 0; f <= timeToFrames(); f++){
t = framesToTime(f);
if (trackValue.valueAtTime(t) <= 0 ){
check = true;
break;
}
}
if (check)
t;
else
time;