FORUMS: list search recent posts

Auto-Orient along Path Not Working with Expression Delay

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kevin C. Burke
Auto-Orient along Path Not Working with Expression Delay
on Dec 24, 2014 at 8:48:04 am

Hi,
I have a scenario where I have two layers animating in a 3D circle. The leader has the position keyframes and the follower is delayed using valueAtTime. I have Auto-Orient 'Orient along Path' turned on for the leader but not the follower. For the follower, I am using the following expression in its Orientation property (see expression, below).

It works well except for at the beginning and end when the position property of the Leader and Follower are equal. When they are, it snaps from path orientation to 0°,0°,0° (see image, below). The same thing happens if I use Auto-Orient 'Orient along Path' with the Follower. Can anyone please help?



var leaderLayer = thisComp.layer("Leader Layer");
var overlapTime = thisComp.frameDuration;
p0 = position;
p1 = leaderLayer.transform.position.valueAtTime(time+overlapTime);
lookAt(p0,p1);


Return to posts index

Dan Ebberts
Re: Auto-Orient along Path Not Working with Expression Delay
on Dec 24, 2014 at 5:47:18 pm

I'd try something like this:

L = thisComp.layer("Leader Layer");
lookAt(position,L.toWorld([L.width/2,L.height/2,1],time-thisComp.frameDuration));


Dan



Return to posts index

Kevin C. Burke
Re: Auto-Orient along Path Not Working with Expression Delay
on Dec 24, 2014 at 8:42:12 pm
Last Edited By Kevin C. Burke on Dec 24, 2014 at 8:47:53 pm

Hi Dan, thank you VERY much for the response. It's not flipping, but now there is an odd rotation:


These are the transform properties for both layers:


Return to posts index


Dan Ebberts
Re: Auto-Orient along Path Not Working with Expression Delay
on Dec 24, 2014 at 8:46:15 pm

Do you have auto-orient turned on for that layer?

Dan



Return to posts index

Kevin C. Burke
Re: Auto-Orient along Path Not Working with Expression Delay
on Dec 24, 2014 at 8:50:25 pm

I just double-checked and I do not. Auto-Orient 'Orient Along Path' is only turned on for the Leader layer.

Here's a screenshot of my transform properties:


Return to posts index

Kevin C. Burke
Re: Auto-Orient along Path Not Working with Expression Delay
on Dec 24, 2014 at 8:54:32 pm

And this is my project file:
8328_autoorient.aep.zip


Return to posts index



Dan Ebberts
Re: Auto-Orient along Path Not Working with Expression Delay
on Dec 24, 2014 at 9:07:42 pm

Ah, shape layers. Try it this way:

L = thisComp.layer("Leader Layer");
lookAt(position,L.toWorld([L.anchorPoint[0],L.anchorPoint[1],1],time-thisComp.frameDuration));



Return to posts index

Kevin C. Burke
Re: Auto-Orient along Path Not Working with Expression Delay
on Dec 24, 2014 at 9:11:22 pm

Dan, thank you so much! Your help to the AE community is invaluable. I sent you a tip through Motionscript. Merry Christmas and thanks again!


Return to posts index

Dan Ebberts
Re: Auto-Orient along Path Not Working with Expression Delay
on Dec 24, 2014 at 9:30:20 pm

Happy to help--thanks for the tip!

Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]