Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Mateo Baldasare on August 20, 2019 at 1:36 pm

    Hi there!

    I’m having some trouble working around this expression. It is a simple rig to align a shape layer to the right/center/left depending on what you select.
    It works just fine but I would like to parent this layer to a null object without changing its actual position.

    My question is how to turn the specific values that I set into toWorld values, so when I parent it to the null it won’t jump to another position.

    For instance, how do I turn that “220” into a toWorld output?

    Thanks!

    y = transform.position[1];
    align = thisComp.layer("Settings").effect("Settings")("Align");

    if(align == 1) toWorld([220,y]);
    if(align == 2) toWorld([960,y]);
    if(align == 3) toWorld([1700,y]);

    Alex Printz replied 6 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Alex Printz

    August 29, 2019 at 9:24 pm

    y = transform.position[1];
    align = thisComp.layer("Settings").effect("Settings")("Align");

    if(align == 1) x = toWorld([220,y]);
    if(align == 2) x = toWorld([960,y]);
    if(align == 3) x = toWorld([1700,y]);

    hasParent ? parent.fromWorld(x) : x;

    Alex Printz
    Mograph Designer

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