Copy link to clipboard
Copied
Take a look at this video. The red line moves right as the time scale moves left (from 1945 to 1964). I'm wondering what expression I could give the time scale so that it moves automatically to the left when I move the red line to the right.
<grumble> I really wish AE had a feature like 3DS Max's Reaction controller </grumble>.
Thank you.
Ah, with dimensions separated I guess it would be like this:
p = thisComp.layer("Red Line").transform.position;
linear(p[0],352,1538,2114,-658);
Dan
Copy link to clipboard
Copied
Basically all I'm looking to do is
When object Red Line x = 352
object Base x should = 2114
When object Red Line x = 1538
object Base x should = -658
Thanks.
Copy link to clipboard
Copied
I haven't tested it, but something like this should work:
p = thisComp.layer("Red Line").transform.position;
x = linear(p[0],352,1538,2114,-658);
[x,value[1]]
Dan
Copy link to clipboard
Copied
Thanks, Dan. I'm getting an error saying "Property or method named '1' is missing or does not exist. It may have been renamed, moved deleted, or mistyped."
Copy link to clipboard
Copied
I assumed you would apply the expression to the Position property of the Base layer. Is that not the case?
Dan
Copy link to clipboard
Copied
I did. See attached.

Copy link to clipboard
Copied
Ah, with dimensions separated I guess it would be like this:
p = thisComp.layer("Red Line").transform.position;
linear(p[0],352,1538,2114,-658);
Dan
Copy link to clipboard
Copied
Fantastic! Thanks so much!!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more