Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions valueAtTime on a toWorld orientation grab

  • valueAtTime on a toWorld orientation grab

    Posted by Mike Mathes on April 15, 2016 at 8:25 pm

    Hi,

    I am trying to have a footprint animation appear at a certain point along a null layers motion path. I’ve achieved the position part but I am struggling with the orientation. I’m using this code from the great Dan Ebberts(love this guy) and it works as it should, but I only need it’s orientation at the footprint layers inPoint. The footprint appears where I want it to but it continues turning as the null object moves along it’s path. I’ve tried using valuAtTime in various locations in the code but inevitably I end up with a ‘valueAtTime is undefined’ error. Any help with this would be greatly appreciated.

    Thanks,
    Mike

    lay = thisComp.layer("foot control");
    delta = toWorld(anchorPoint) - lay.toWorld([0,0,0]);
    rot = radiansToDegrees(Math.atan2(delta[0],delta[2]));
    val = value+rot;
    val.valueAtTime(inPoint);

    Mike Mathes replied 10 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 15, 2016 at 9:13 pm

    toWorld() has an optional time parameter, which is probably what you want. Something like this:

    toWorld(anchorPoint,inPoint)

    or

    lay.toWorld([0,0,0],lay.inPoint)

    Dan

  • Mike Mathes

    April 15, 2016 at 9:17 pm

    Thanks Dan. Sorry, I should of searched better. I found where you answered that for someone before, after I posted. You’re the best and I love your site.

    Take care,
    Mike

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