Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions expression for camera distance relating to timeline of precomp

  • expression for camera distance relating to timeline of precomp

    Posted by Eve Weinberg on May 6, 2009 at 8:48 pm

    I have a precomp that has a few different stills in it (sequenced in time).The precomp goes into my main comp, which has a camera zooming past it. I want the precomp to jump to a certain frame when it reaches a certain distance from the camera. Is this possible?

    Dan Ebberts replied 17 years, 4 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    May 7, 2009 at 12:08 am

    A time remapping expression like this would probably do the trick:

    minDist = 500; // distance where switch happens
    f = 30; // frame to jump to

    c = thisComp.activeCamera;
    d = length(toWorld(anchorPoint),c.toWorld([0,0,0]));
    if (d < minDist) framesToTime(f) else value Dan

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