• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Auto orient only x and y to 3d path

Explorer ,
Sep 18, 2020 Sep 18, 2020

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.

TOPICS
Expressions , Scripting

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Sep 21, 2020 Sep 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]))

 

Votes

Translate

Translate
LEGEND ,
Sep 18, 2020 Sep 18, 2020

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 18, 2020 Sep 18, 2020

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 21, 2020 Sep 21, 2020

Copy link to clipboard

Copied

LATEST

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines