ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Path point expression not working on 3D layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tom Metzler
Path point expression not working on 3D layer
on Dec 13, 2018 at 12:47:07 am

Hello,

I am trying to make a null object follow a mask path I have drawn on a layer. The following is an expression that I found online in order to make the null position follow the mask path:

tPath=thisComp.layer("Black Solid 1").mask("Mask 1").maskPath;
tLayer=thisComp.layer("Black Solid 1");
tLayer.toComp(tPath.pointOnPath(effect("Slider Control")("Slider")/100));


The slider makes it so that I can keyframe the completion of the null moving along the path (by percent.)
The expression works perfectly fine on a 2D layer, but the moment I make the null a 3D layer it no longer works; the path appears to be offset and in the wrong location. The layer "Black Solid 1" is a 3D layer which isn't a problem, the expression works fine with this layer being 3D. It's just the null object that the 2D/3D affects whether it works or not. It is necessary for the null to be 3D because I will be connecting a point light to it.

I'm sorry if this is confusing, I can make a screen recording if that would help anyone understand the situation.

Any help would be appreciated.
Thanks,
Tom


Return to posts index

Dan Ebberts
Re: Path point expression not working on 3D layer
on Dec 13, 2018 at 1:03:03 am

Try toWorld() instead of toComp().

Dan



Return to posts index

Tom Metzler
Re: Path point expression not working on 3D layer
on Dec 13, 2018 at 1:39:51 am

Thank you Dan! Worked perfectly.

Tom


Return to posts index

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