Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Path point expression not working on 3D layer

  • Path point expression not working on 3D layer

    Posted by Tom Metzler on December 13, 2018 at 12:47 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

    Tom Metzler replied 7 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    December 13, 2018 at 1:03 am

    Try toWorld() instead of toComp().

    Dan

  • Tom Metzler

    December 13, 2018 at 1:39 am

    Thank you Dan! Worked perfectly.

    Tom

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy