-
Path point expression not working on 3D layer
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