Skip to main content
Inspiring
May 25, 2017
Answered

Position reaction expression

  • May 25, 2017
  • 1 reply
  • 1302 views

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.

This topic has been closed for replies.
Correct answer Dan Ebberts

I did. See attached.


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

1 reply

Inspiring
May 25, 2017

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.

Dan Ebberts
Community Expert
Community Expert
May 25, 2017

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

Inspiring
May 25, 2017

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."