Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Effect or expression to display a layer’s position values

  • Effect or expression to display a layer’s position values

    Posted by William Porter on July 13, 2012 at 1:28 pm

    Does anybody know if there is a way for a layer to display it’s own position values?

    To clarify I mean so that the position values are rendered next to, or on the layer itself. Just like on an air traffic control radar. (Please see reference images)

    I don’t want to simulate the numbers, I need them to be real and displaying their actual position.

    I’m not sure if this has already been looked into, but I can’t find anything on the subject.

    Thank you in advance for any enlightenment!

    4397_atlanta.jpeg.zip
    4398_lax20radar.jpeg.zip

    Bill Porter replied 13 years, 9 months ago 3 Members · 3 Replies
  • 3 Replies
  • Brian Charles

    July 13, 2012 at 2:32 pm

    You’ll need 2 layers. The moving object and a text layer. On the text layer use the following expression for the Source text property:

    p1 = thisComp.layer(“Object”).transform.position[0];
    p2=thisComp.layer(“Object”).transform.position[1];
    [p1,p2]

    Replace the word “Object” in the expression with the name of the moving layer.

  • Brian Charles

    July 13, 2012 at 3:12 pm

    To round the numbers you could use this:

    p1 = thisComp.layer(“Object”).transform.position[0];
    p2=thisComp.layer(“Object”).transform.position[1];
    [(Math.round(p1)),(Math.round(p2))]

  • Bill Porter

    August 15, 2012 at 2:46 pm

    Apologies for the late reply! Thank you, that is elegant and fantastic!

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