Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Parenting the position of a 3D object to the XY of a NON 3D, and the Z to another 3D object on the same scene.

  • Parenting the position of a 3D object to the XY of a NON 3D, and the Z to another 3D object on the same scene.

    Posted by Eduardo enrique Meza on August 8, 2015 at 9:47 am

    I have a 3D Null object which position values need to be configured the following way:

    X,Y values need to be parented to the X,Y values of a NON-3D object.

    Whereas Z value needs to be parented to the Z position of ANOTHER 3D object in the same comp.

    How do I do this???

    Many thanks in advance,

    e.

    Eduardo enrique Meza replied 11 years ago 2 Members · 3 Replies
  • 3 Replies
  • Xavier Gomez

    August 8, 2015 at 1:41 pm

    This expression in the position property of the null should work:

    p = thisComp.layer(“2D object”).transform.position.value;
    p[2] = thisComp.layer(“3D object”).transform.position.value[2];

    p;

    Xavier.

  • Eduardo enrique Meza

    August 11, 2015 at 6:23 am

    Professor Xavier,

    For some reason it’s still not working. But I’d like to understand the logic of the expression to see if I can solve it.

    Essentially, I’m working with the plugin Element 3D by video copilot… and in here, the objects contained inside this effect (for some reason) present the XY position values separated from the Z value….

    So basically what I’m trying to do, is to parent the position values of a null to the ones in this object…

    Many thanks in advance,

    e.

  • Eduardo enrique Meza

    August 11, 2015 at 6:44 am

    Xavier just solved it!

    x= thisComp.layer(“Ritual”).effect(“Element”)(“1. Position XY”)[0];

    y= thisComp.layer(“Ritual”).effect(“Element”)(“1. Position XY”)[1];

    z= thisComp.layer(“Ritual”).effect(“Element”)(“1. Position Z”);

    [ x , y , z ]

    <3

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