Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Weird positioning problem…..

  • Weird positioning problem…..

    Posted by Michael Combs on January 26, 2006 at 5:28 pm

    I’m working on a spot where I am using particular to generate cartoon hearts above a characters head. What I intended to do is to parent a null layer to the characters head and use an expression to move particular’s emitter to where the null is. Standard procedure, right?

    The problem I’m facing is how AE is positioning the null layer. Currently, the position of the null reads about 4000 pixels OFF of where it is. When I position the pointer in the comp window, the x/y position of the pointer reads one thing, while the position of the null reads another. When I tie the emitter to the null with the expression, it moves the emitter 4000 pixels off of where I want it.

    So my questions are this:

    Shouldn’t the null’s position and the x/y in the info window (when the pointers on it) be the same?

    How do I fix it?

    Dan Ebberts
    replied 20 years, 3 months ago
    3 Members · 2 Replies
  • 2 Replies
  • Mylenium

    January 26, 2006 at 5:45 pm

    You’re forgetting layer space transformation. Since your null is parented, values will be different as they occur in the local space of the parent. In that case you will need to use some more expression code for the emitter position:

    emitter_null=thisComp.layer(“Null”);
    emitter_pos=emitter_null.toWorld([0,0,0]);

    [emitter_pos]

    Mylenium

    [Pour Myl

  • Dan Ebberts

    January 26, 2006 at 5:48 pm

    The position of any layer that has a parent is no longer represented in world space, but relative to the parent’s upper left corner. If you want the world or comp equivalent, you need to use one of the layer space transforms. It would look like this:

    L = thisComp.layer(“Null 1”);
    P = L.toWorld(L.anchorPoint);

    or

    L = thisComp.layer(“Null 1”);
    P = L.toComp(L.anchorPoint);

    Dan

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