Copy link to clipboard
Copied
I can't find the solution - you?
I have a 3D path (Null layer) and a 3D layer that follows the path. Lets say the 3D Layer is a 2D flash. The flash has always to face the camera/screen. But I want this flash to follow the path and show in the direction it moves. Of course if it moves only in z space it could rest in a default position.
Thanks a lot for any help.
Thank you for the quick responses! They did not solve my problem, but guided me to this page with the solution...
https://creativecow.net/forums/thread/expression-to-calculate-direction-of-movement-for/
v = position – position.valueAtTime(time-thisComp.frameDuration);
radiansToDegrees(Math.atan2(v[1],v[0]))
Copy link to clipboard
Copied
Copy link to clipboard
Copied
If Dan's auto orient to Y only script doesn't work;
Auto orient a null to the path you want the layer (flash) to follow. Make sure the Anchor Point of the layer (flash) is at the desired center of the layer. Hold down the Shift key and Parent the layer to the null, Open the layer/transform/rotation properties, then rotate the layer to make it face the right direction.
If that doesn't solve the problem we need screenshots with the modified properties of the layers revealed and a detailed description of the design goal. Press uu and post a full screenshot of the UI with the motion path of the layer following the path showing in the comp panel and if necessary at least 2 views so we can see what you are dealing with.
Copy link to clipboard
Copied
Thank you for the quick responses! They did not solve my problem, but guided me to this page with the solution...
https://creativecow.net/forums/thread/expression-to-calculate-direction-of-movement-for/
v = position – position.valueAtTime(time-thisComp.frameDuration);
radiansToDegrees(Math.atan2(v[1],v[0]))