Mobile app version of vmapp.org
Login or Join
Yeniel278

: After effects expression parent layer position relative to original position I have a situation where I need to use an expression to link two layers position values to one another but subtract

@Yeniel278

Posted in: #AdobeAfterEffects

I have a situation where I need to use an expression to link two layers position values to one another but subtract the difference between the two so that they move together but the child stays in its original relative position.

example:
Parent = 100
Child = 50

Parent+(Child-Parent)=50

The expression I wrote seams to work at first as the layer stays in the right spot and I don't get any errors. But the layer doesn't move with the parents animation.

EXSPRESSION
parent=thisComp.layer("PARENT").transform.position;
child=transform.position;

parent+(parent-child)

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Yeniel278

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme