ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How to combine position and anchor point into an expression? Or get the absolute path of null?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Devin Rice
How to combine position and anchor point into an expression? Or get the absolute path of null?
on Oct 2, 2019 at 5:50:58 pm

I have a null that has a bunch of position values in x and y space and an anchor point that moves it through z space (with some x and y to help with that). I'm trying to get the absolute position of this so that I can add this position to a Light (that doesn't have an anchor point). Is there a way to use an expression to get the absolute position of this null?

I tried to do this expression in the Light: thisComp.layer("Motion Path 1 Null").transform.position + thisComp.layer("Motion Path 1 Null").transform.anchorPoint

However this flips and flops the motion path. It seems just adding the anchor point to the position doesn't work. What is the correct way to do this math? Or is there just some sort of way to combine the anchor point into the position so I can have the position itself moving through z space?

thisComp.layer("Motion Path 1 Null").transform.position + thisComp.layer("Motion Path 1 Null").transform.anchorPoint


Return to posts index

Dan Ebberts
Re: How to combine position and anchor point into an expression? Or get the absolute path of null?
on Oct 2, 2019 at 7:23:29 pm

See if this does what you need:

L = thisComp.layer("Null 1");
L.toWorld([0,0])


Dan



Return to posts index

Devin Rice
Re: How to combine position and anchor point into an expression? Or get the absolute path of null?
on Oct 2, 2019 at 7:59:11 pm

Ah thank you so much! Yes, it does!


Return to posts index

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