An expression for positioning an element

New Here ,
Feb 25, 2022 Feb 25, 2022

Copy link to clipboard

Copied

Hello,

I’ve got a problem with creating a proper expression when it comes to a position of an image.

I do have this expression placed in position: thisComp.layer("TA1").transform.position

 

 

My goal is adding to this expression (thisComp.layer("TA1").transform.position)

An extra line which can move the whole image by 200 pixels down

 

I don’t know what to type in order to make it work or how to solve it. I’ve tried to do my research on expressions but so far unable to find any answers myself.

 

Thank you in advance

BC01B175-F9C9-442E-8A49-F1A4EF8E4D77.jpeg

TOPICS
Dynamic link , Expressions , Scripting

Views

94

Likes

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
Community Expert ,
Feb 25, 2022 Feb 25, 2022

Copy link to clipboard

Copied

This should work (if I understand what you're after):

p = thisComp.layer("TA1").transform.position;
p + [0,200]

Likes

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
Community Expert ,
Feb 25, 2022 Feb 25, 2022

Copy link to clipboard

Copied

LATEST

You didn't mention in which direction you want to move the image, and since I notice you use a 3D layer so may you want to move the image in Z position in this case, you need to add one more value to Dan's solution and the expression should look like this 

p = thisComp.layer("TA1").transform.position;
p + [0,0,200]

 

Likes

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