ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Horizontal scroll from specific starting position

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Gabriel Gama
Horizontal scroll from specific starting position
on Sep 20, 2019 at 1:57:33 am

Hello everyone!

I'm trying to automate scroll of many objects on an horizontal axis, from left to right, and then disappear. The point is that the start position is important to alignment (manual repositioning).

I used the following expression without success.

xPos= (time * 150)-175 ;
yPos = position[1] ;
[ xPos , yPos ]

But with this, all my objects start at the same point and also movement is always related to global time which is not good if I want one object to follow another one on an horizontal scroll line.

Any ideas?


Return to posts index

Scott McGee
Re: Horizontal scroll from specific starting position
on Sep 20, 2019 at 8:03:58 am

If I've read this right. You want to do something like this.

Layer 1:
xPos= (time * 150)-175 ;
yPos = position[1] ;
[ xPos , yPos ]

Layer 2 +:
padding = SPACE HOW YOU WANT IT;
xPos = thisComp.layer(index-1).position[0] - thisComp.layer(index-1).sourceRectAtTime().width - padding;
yPos = thisComp.layer(index-1).position[1] ;
[ xPos , yPos ]


Return to posts index

Gabriel Gama
Re: Horizontal scroll from specific starting position
on Sep 20, 2019 at 5:53:57 pm

Almost! Let me try to write it in another way (Maybe I'm didnt explain it correctly)
Is it possible to make a an object follow a horizontal prefixed path (lets say go 1920 pixels to the right) in 10 seconds?
This way I cant manually arrange the objects as they move in the timeline!

I'm trying this with expressions because I have thousands of objects that should follow a linear path, going inside the compostion and the outside (for a 1080p resolution)

Basically make objects go from left to right in a fixed time, independent of initial position and time duration of the object.


Return to posts index


Gabriel Gama
Re: Horizontal scroll from specific starting position
on Sep 24, 2019 at 9:38:27 pm

In the end I found a solution for myself!

veloc = 100;
x = position[0] + (time - inPoint) *veloc;
y = position[1];
[x,y]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]