2

Im trying to do an expression to my object. I want to make him come out from the side to center. I searched a lot but I didnt find any expression. I can do it with keyframes but I need expression only. Please, can someone help me with expression?

1 Answer 1

1

Expressions work by returning a value to the property to which they are applied. So if you apply an expression to the position property and you put in the expression

[1,2]

in the expression editor, it will return the value [1,2] so that will be the position of that layer, i.e x= 1 y=2. Because the values 1 and 2 don't change, it will stay there forever.

If you have an expression on the position where the x value increases over time then the layer will move right. So for example if you put the expression

[time, thisComp.height / 2]

the layer will start at [0, 540] (if the comp is 1080 px high) and move right at the rate of 1 pixel per second. For a HD frame it will reach the right side at around 1:17:20. That might be too slow, but you can use maths to adjust it. For example to make it twenty times as fast you could multiply it by 2, like so:

[time * 20, thisComp.height / 2]

So in the expressions editor you can see the drop-down with the available objects, properties and methods. You can use these along with the pick-whip to build up the expression to do whatever you need.

You might want to start looking at Dan Ebbert's site. I can't quite believe that anyone could spend any time researching expressions and not find this site in the search results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.