Skip to main content
ededinson
Inspiring
September 18, 2020
Answered

Auto orient only x and y to 3d path

  • September 18, 2020
  • 3 replies
  • 1523 views

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.

This topic has been closed for replies.
Correct answer ededinson

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]))

 

3 replies

ededinson
ededinsonAuthorCorrect answer
Inspiring
September 21, 2020

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]))

 

Community Expert
September 18, 2020

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.

Mylenium
Legend
September 18, 2020