1 Reply Latest reply on Apr 20, 2015 12:25 AM by Rick Gerard

    can i measure moving distance using after effects?

    namwook89876122

      can i measure moving distance using after effects?

        • 1. Re: can i measure moving distance using after effects?
          Rick Gerard Adobe Community Professional & MVP

          I don't know what you mean. If you mean take measurements like you can in Photoshop and relating them to the real world then the answer is not easily. No Effect I know of allows you to do that. If you mean measuring the distance in pixels a layer moves on any axis, yes you can measure that and display the result using an expression by either referring to a valueAtTime of a keyframe or a layer marker. For a layer marker for example showing the X distance a layer moves starting at first layer marker you would add this expression to the source text of a blank text layer. The moving layer would be named "target."

          t = thisComp.layer("target");

          mp = t.marker.key(1).time;

          ip = t.position.valueAtTime(mp);

          np = t.position[0] - ip[0];

          Math.round(np)

           

          If the layer is moving left to right and the marker is in the middle of the layer then the numbers will be negative until the marker is reached, zero at the marker, then positive after the marker is past.