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

How to make a "push away" animation with expressions?

New Here ,
Mar 07, 2024 Mar 07, 2024

Hey, I was wondering if anyone could help me out with a project. I'm trying to make this animation and use the least amount of keyframes possible.

Comp 1_1.gif

 

The reason why I just don't do it the same way as the example above is because I'm gonna have to do it for multiple compositions and the text position will always vary. Also, there will be a text 3, 4 and 5 each on a different direction. So I'm assuming expressions would be less time consuming.

 

Like this one:

Comp 2.gif

The expression used was just linking one layer's position and adding a +X value, so I'm guessing something similar maybe.

OsvelBQ_0-1709855938956.png

 

Thanks for any help.

TOPICS
Expressions , How to
323
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

Advocate , Mar 07, 2024 Mar 07, 2024

Create a rectangle with its anchor point in the middle.

Duplicate the layer

position expression:

 

margin = 10;
target = thisComp.layer(index + 1);
mainScale = target.scale;
mainPos = target.position;
h = target.sourceRectAtTime().height/2;
x = mainPos[0];
y = mainPos[1] - h - margin - h * mainScale[1] / 100;
[x,y]

 

 screenshot.png

 

Translate
Advocate ,
Mar 07, 2024 Mar 07, 2024

Create a rectangle with its anchor point in the middle.

Duplicate the layer

position expression:

 

margin = 10;
target = thisComp.layer(index + 1);
mainScale = target.scale;
mainPos = target.position;
h = target.sourceRectAtTime().height/2;
x = mainPos[0];
y = mainPos[1] - h - margin - h * mainScale[1] / 100;
[x,y]

 

 screenshot.png

 

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
New Here ,
Mar 08, 2024 Mar 08, 2024
LATEST

Thank you so much, it worked!

If you don't mind, could you walk me a bit through it? I'm still trying to understand expressions better.

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