Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expression: X&Y coordinates

  • Expression: X&Y coordinates

    Posted by Erin Patrick on November 8, 2006 at 9:29 pm

    I want to have a text layer that shows the current X&Y coordinates of another layer as it moves across the screen. So, I made a new text layer, added an expression to the source text property, and pickwhipped the position value of the target layer. It worked fine, but my question is, can I get both the X&Y coordinate at the same time, or do I have to do that on two seperate layers of text? Also, how can I limit the number of decimal placesin the text layers to two or three, because now it’s showing about 13 decimal places.
    Thanks in advance for the help!

    Mark Ekstrand replied 16 years, 11 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    November 8, 2006 at 9:55 pm

    Something like this:

    p = thisComp.layer(“myLayer”).position;
    “” + Math.round(p[0]*100)/100 + ” ” + Math.round(p[1]*100)/100

    Dan

  • Erin Patrick

    November 8, 2006 at 9:59 pm

    WOW! That was exactly what I needed! One day, I’ll get the hang of expressions, hopefully.
    Thanks again.

  • Mark Ekstrand

    September 2, 2009 at 1:28 am

    how can i get the coordinates from a spreadsheet?

    MarkE

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