Copy link to clipboard
Copied
i have a simple expression that links the first point of the shape lazer to a null.
createPath(points = [thisComp.layer("Null 20").transform.position-[960,540], [100,0], [100,100]], inTangents = [], outTangents = [], is_closed = false)
this works untill i move the position of the shape layer. is there a way to tweek this simple expression to make it work even if i move the shape layer?
i am thinking about a toComp command but i dont know how to put it in.
i am also aware of the "Create Nulls From Path.jsx" but i dont want to use it now, i want to keep it simple.
thanks!
Try it this way:
createPath([fromComp(thisComp.layer("Null 20").transform.position),[100,0],[100,100]],[],[],false)
Dan
Copy link to clipboard
Copied
Try it this way:
createPath([fromComp(thisComp.layer("Null 20").transform.position),[100,0],[100,100]],[],[],false)
Dan
Copy link to clipboard
Copied
ehi dan, thanks a lot for the help it works perfectly!
but now i was trying to make it work even if the null is 3d, any idea?
thanks!
i am doing this just to learn some expressions, i still have a long way to go
Copy link to clipboard
Copied
Try this:
N = thisComp.layer("Null 20");
createPath([fromComp(N.toComp(N.anchorPoint)),[100,0],[100,100]],[],[],false)
Dan
Copy link to clipboard
Copied
Hey Matteo, considering how Create Nulls From Path.jsx works - its either points follow nulls, or vice versa.
With this in mind - can you explain the reason why you might want to move it separately? As a different workaround, you could have all points controlled by nulls and when position change is needed, just animate them all.
Unless someone has a solution to pull this through with the parenting null position to shape in a proper way. Cheers.
Edit: based on Dan's response, I kind of imagined it is required that null follows the shape like no path controller is applied, instead of pinning to that initial point.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now