Skip to main content
Participant
October 31, 2021
Question

Hi everyone is there an expression make a layer move when when other layer disappear?

  • October 31, 2021
  • 1 reply
  • 98 views

Hi everyone I'm working on a new MOGRT but I have a little problem that there are 2 layers 

 

Layer No. 1 begins the movement and continues in a straight line until it is equal to the length of the path - which depends on the length of the text written by the user - and Layer No. 1 disappears and reaches the place of Layer No. 2
Layer No. 2 has a specific path, but the problem is when does the movement begin?
Unfortunately, the path is specified with the information of the place and time, and here the starting time is changed according to the time when Layer 1 reaches the end of the path and disappears

This topic has been closed for replies.

1 reply

Mylenium
Legend
October 31, 2021

Could be as simple as 

 

p1=thisComp.layer("P1");

p1Start=p1.transform.position.key(1).time;

p1End=p1.transform.position.key(2).time

 

X=linear(time,p1Start,p1End,300,500)

Y=value[1];

 

[X,Y]

 

or similar and the rest would just be position values, which you could of course also link to extra sliders. All of that of course assumes you are only using simple linear paths indeed. Complex swirling around would require more complex math to get continuous motion.

 

Mylenium