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

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

New Here ,
Mar 07, 2024 Mar 07, 2024

Copy link to clipboard

Copied

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

Views

97

Translate

Translate

Report

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

Engaged , 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

 

Votes

Translate

Translate
Engaged ,
Mar 07, 2024 Mar 07, 2024

Copy link to clipboard

Copied

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

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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