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

how to write expression in such case.

Engaged ,
Nov 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

I am very new into expression world, I am experimenting to learn.

In this animation I want the text layer (‘Red ball is moving’) to follow the red ball, but the position will be slightly beneath the red ball, it will follow the whole poingpong animation but from below, not like the grey ball, which is exactly aligned with the red ball.

I know that if the value is ‘array type’ then I have to be very specific in expression writing, so that after effects know which value I want to manipulate and which one I dnt.

Here I specified that I want position [0] to be 100 pixels beneath the red ball.

Hence I wrote position [0]-100; But it throws the text away the from the comp and animating it in an odd place, which I dnt want.

I don’t know how and what should I write to tell after effects that keep the Y axis same for the text layer.

I tried many things like position[1, value], so that Y axis from position remain same, but all end up in error.

Please guide me. I am lost.

 

 

red ball is moving.gif

TOPICS
Expressions

Views

377

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

Community Expert , Nov 28, 2023 Nov 28, 2023

I'm not sure this is what you're asking for, but try it this way and we'll take it from there:

s = thisComp.layer("Shape Layer 1").effect("Slider Control")("Slider");
p = thisComp.layer("red ball").transform.position;
ease(s,0,100,value,[p[0]-100,value[1]])

Votes

Translate

Translate
Community Expert ,
Nov 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

I'm not sure this is what you're asking for, but try it this way and we'll take it from there:

s = thisComp.layer("Shape Layer 1").effect("Slider Control")("Slider");
p = thisComp.layer("red ball").transform.position;
ease(s,0,100,value,[p[0]-100,value[1]])

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
Engaged ,
Nov 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

LATEST

😮 😮 😮

 

this is EXACTLY what I wanted. 😮 😮

 

Thank you sooooo much.  😮 😮

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