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

Rotation along a diagonal axis

New Here ,
Jan 13, 2020 Jan 13, 2020

Copy link to clipboard

Copied

I have a 3d shape layer that I would like to rotate across one of its edges instead of the traditional x, y, or z axis. For example, in the attached image, I might rotate the blue hexagon up and over (in 3D space) so it would land on top of the green hexagon. Is there a way I can rotate the x or y axis or simply create a custom axis of rotation?

 

Thanks!

TOPICS
How to

Views

4.0K

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

Engaged , Jan 13, 2020 Jan 13, 2020

3D layers have both rotation and orientation properties. They do similar things, but the benefit of two controls is that you can set the orientation of your layer independently and then rotate around the layer's own major axes. So for the hexagon you'd do something like this:

  • start with a hexagon that is standing up—with points at the top and bottom and parallel lines on the sides.
  • put the anchor point on the right hand side
  • adjust the Z orientation to 30°
  • animate the Y rotation (note, rotation NOT
...

Votes

Translate

Translate
Engaged ,
Jan 13, 2020 Jan 13, 2020

Copy link to clipboard

Copied

If I understand correctly you'd use expressions. So you'd have to figure out the math but an example expression would be something like:
transform.yRotation/2

That will make the rotation of that axis = to the Y rotation divided by 2. 

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
Engaged ,
Jan 13, 2020 Jan 13, 2020

Copy link to clipboard

Copied

3D layers have both rotation and orientation properties. They do similar things, but the benefit of two controls is that you can set the orientation of your layer independently and then rotate around the layer's own major axes. So for the hexagon you'd do something like this:

  • start with a hexagon that is standing up—with points at the top and bottom and parallel lines on the sides.
  • put the anchor point on the right hand side
  • adjust the Z orientation to 30°
  • animate the Y rotation (note, rotation NOT orientation) from 0° to 180°

 

rot8.gif

 

If you're using a polystar shape as your hexagon, you can precisely line up the anchor point with the right hand side with an expression. The width of the hexagon will be different from its radius, if you look you'll see that a line from the center to the center of the right edge, to the top of the right edge and back to the center creates a right-angled triangle.

 

Adobe After Effects 2020 - Untitled Project.aep _-2020-01-14 17_58_08.png

The long side is the radius and the width will be the cosine of the angle × the radius of the hexagon. The angle expressed in radians is π/(number of points in the polygon), so the expression on the anchor point just needs to find polygon radius × π / number of points, or something like:

 

 

[Math.cos(Math.PI/content("Polystar 1").content("Polystar Path 1").points)*content("Polystar 1").content("Polystar Path 1").outerRadius, value[1]]

 

 

that's assuming the polystar is called "Polystar 1"

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
New Here ,
Jan 13, 2020 Jan 13, 2020

Copy link to clipboard

Copied

LATEST

That's what I needed. Thanks! Unfortunately that was the simplified example. Now to do a bunch of trig and figure out where my triangle and trapezoid vertices need to be pre-orientation.. 🙂

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