ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Offset position on a motion path

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
jonas ferreira
Offset position on a motion path
on Dec 5, 2019 at 10:03:52 pm

I have an object on a motion path and I want to duplicate it but offset and have the offset increase as it moves along the path using index without using time. Right now I have it working but using a time expression does not give me consistency. The spacing of objects change with new layer. Any input would be much appreciated.

Thanks!


Return to posts index

Julien Schickel
Re: Offset position on a motion path
on Dec 6, 2019 at 12:46:27 pm

Something like that might do the trick, supposing your original object has two keyframes & you want your offset in Y:

P=thisComp.layer("your object name").transform.position;

A=P.key(1).time;
B=P.key(2).time;

linear(time,A,B,P.valueAtTime(A),P.valueAtTime(B)+[0,index*500])

Julien Schickel
Editor & motion designer
https://www.youtube.com/channel/UC7_NVR3JLdhEYDlEQuNFfug


Return to posts index

jonas ferreira
Re: Offset position on a motion path
on Dec 6, 2019 at 4:53:22 pm

Hey Julien,

Actually my object has more than 2 key frames and I wanted to offset the position on the path, and have that number increase over time for each duplicated layer. So they start off really close together then get farther apart as time goes on.


Return to posts index


Julien Schickel
Re: Offset position on a motion path
on Dec 6, 2019 at 5:40:06 pm

that's what the expression does, I think. You just have to change the number 2 in key(2).time by the number of your last keyframe.

Julien Schickel
Editor & motion designer
https://www.youtube.com/channel/UC7_NVR3JLdhEYDlEQuNFfug


Return to posts index

jonas ferreira
Re: Offset position on a motion path
on Dec 6, 2019 at 5:50:43 pm

Awesome I will give it a shot!


Return to posts index

jonas ferreira
Re: Offset position on a motion path
on Dec 6, 2019 at 8:32:10 pm

That didn't work, but I am trying something a bit different now. I precomped the animation and added a time remap. Now I just want to change the end of the second keyframe multiplied by the index. I do not understand the key() expression much so I have having trouble achieving this. Would you be able to shed some light on this?

Thanks!


Return to posts index

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