Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Position reaction expression

Explorer ,
May 25, 2017 May 25, 2017

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.

TOPICS
Expressions
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 25, 2017 May 25, 2017

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

Translate
Explorer ,
May 25, 2017 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2017 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2017 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."

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2017 May 25, 2017

I assumed you would apply the expression to the Position property of the Base layer. Is that not the case?

Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2017 May 25, 2017

I did. See attached.

TimelineScript-1.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2017 May 25, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2017 May 25, 2017
LATEST

Fantastic! Thanks so much!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines