on Jan 29, 2018 at 3:09:30 pm Last Edited By Ambrose Salmini on Jan 29, 2018 at 6:41:52 pm
So I have a bar graph with a logo above each bar. The head/logos are pulled closer in z-space (-1000px). This is because of a style I have in the transition and I don't want to lose the parallax. When I parent the head/logo to the bar, it moves up with the bar, but because of the z space difference it moves exponentially more pixels than the bar, creating unwanted space between the head/logo and the bar.
I've also tried to use sourceRectAtTime() to no avail, as it still produces the same issue.
In the folowing expression the camera can not be parented as it will return the wrong value. You can use toWorld() or toComp() in that case(haven't really used those, so i can not go in more detail). You put a null at the top of the bar and make it stay there. Then use this expression on your logo layers position. Modify mult until the position is the one you want. Mult should be the distance between camera and your logo. It is not my expression, I got it from here https://zacklovatt.com/points-along-a-line/
p1 = thisComp.layer("Camera").transform.position;
p2 = thisComp.layer("NullAtTopOfBar").transform.position;
mult = thisComp.layer("HELPER").effect("Distance")("Slider");