Activity › Forums › Adobe After Effects › object rotation question
-
object rotation question
Posted by Marcosh on October 1, 2007 at 2:55 pmHi there,
I have an arrow pointing up that I want to perform a basic 2d rotation around a predetermined center point, kind of an orbiting movement. It’s the easiest thing to do but the problem is that as the circular path progresses, the tip of the arrow follows the direction of the momevent.
How do I do so I keep it’s vertical position along the circular path?
Thanks,
Marcos H.
Quad G5
2GB RAM
OS 10.4.7
FCP 5.0.4
AE 6.5Marcosh replied 18 years, 7 months ago 5 Members · 8 Replies -
8 Replies
-
Marcosh
October 1, 2007 at 4:13 pmHey Dave,
Thanks for your response. I did what you suggested but the tip of the arrow, instead of keeping its vertical position, now is moving on the opposite direction of the circular path described by the null object.
I tried: 1) setting the arrow’s anchor point to the center of the comp and 2)setting the anchor point to match the center of my arrow layer and none of it worked.
Am I missing something?
Marcos H.
-
Ray Apokal
October 1, 2007 at 4:22 pmHi Marco,
If it’s a perfect circular path can you move the pivot point to the target, then rotate accordingly?
-
Marcosh
October 1, 2007 at 4:30 pmThe only way I got it to work was to draw a circualr mask shape that described the motion I want the arrow to describe and paste into the arrow position atributes. The arrow kept its direction as the orbit motion was executed.
The problem is that I have 5 of those arrows spread along this orbit and every time I paste the path into each one of their position attributes they all get stacked, falling on the same place.
Still looking for another solution…
Marcos H. -
Mike Clasby
October 1, 2007 at 6:11 pm1) Rotation Correction
Dave’s solution should work.
Put the anchor point of the arrow back to the center of the arrow, parent the arrow to the Null, and then add this expression to the arrow’s rotation (Copy the expression, Alt-click the rotation stopwatch, Paste):
– thisComp.layer(“Null 1”).rotation
It works fine rotating the Null in either direction.
2) To get circular placement of any number of layers
If you want to place the arrows around a circle, add this expression to the arrows position:
NumberAroundCircle = 5;
radius = 180;
center = this_comp.layer(“Null 1”).anchorPoint;
interval=360/NumberAroundCircle;
angle=degrees_to_radians((index-1)*interval);
x=radius*Math.cos(angle);
y=radius*Math.sin(angle);
add(center, [x, y]);Change the “NumberAroundCircle” in line 1 to how ever many items you want to be evenly spread around the circle.
Change the “radius” in line 2 for the size of the circle.
Change the name of the Null in line 3, to the name of your Null, like to “Null 2” if you Null has a different name than “Null 1”.3) To rotate all
Parent the arrows to the Null (select all the arrows, Parent Pickwhip one of them to the Null).
The Null needs to be above or below the arrows, nothing in-between the arrows.You still need that rotation expression on each arrow:
– thisComp.layer(“Null 1”).rotation
Rotate the Null and the arrows rotate will maintain their original orientation, they keep pointing in the same direction.
Move the Null (position) and the arrows move accordingly.You can mass add an expression to multiple layers by putting the expression on one layer, selecting the expression the Edit>Copy Expression Only, then select as many layers as you the expression added to, and Paste. You can do both expressions at once this way also.
Or you can make a preset for this by selecting the position and rotation expression for one arrow, then Animation>Save Animation Preset, name it. Then select all layers, Animation>Apply Animation Preset (but first you need to add that Null or the expressions will break).
The Position expression is a modified version of jjgifford’s from here:
https://www.jjgifford.com/expressions/reference/index.html
-
Kevin Camp
October 1, 2007 at 8:08 pm[marcoshoracio] “The problem is that I have 5 of those arrows spread along this orbit and every time I paste the path into each one of their position attributes they all get stacked, falling on the same place.”
can you just slide the position keyframes over a few frames so the arrow motions are staggered and each arrow will be visible? you can slide the keyframes left or right depending on how you want the motion to start (like, all staggerd, or all from the same start point).
Kevin Camp
Designer – KCPQ, KMYQ & KRCW -
Darby Edelen
October 1, 2007 at 10:52 pmYou should really consider parenting your layers to a Null object to either control the position of the circular paths or to control the rotation itself (as Dave first suggested). If you have specific questions about Parenting and it’s amazing usefulness, please inquire =)
Darby Edelen
DVD Menu Artist
Left Coast Digital
Aptos, CA -
Kevin Camp
October 2, 2007 at 12:00 amif i understand what he’s going for, he may be better off not parenting (in this case) …. as every time he wants to rotate the parent, he has to counter the rotation of the child to keep it pointing upward, and then he has to compensate for an offset of the next child, and offset its rotation to keep it pointing upward too.
just pasting a circle mask as a motion path for 5 layers, then offsetting the keyframes to offset he rotations is pretty quick.
Kevin Camp
Designer – KCPQ, KMYQ & KRCW -
Marcosh
October 2, 2007 at 12:04 pmHey guys,
Thanks a lot for all the answers. I ended up achieving what I wanted using my basic skills…
I laid all the arrows in a comp, kept the anchor point in the center of the arrows and rotate them in one direction. I then nested that comp and rotated it in the opposite direction replicating the same speed of the arrows’ spinning movement.
It worked pretty well. I’ll definitelly save the comments posted here. I’m sure they’ll be useful in the future!
Thanks again!
Marcos H.
Quad G5
2GB RAM
OS 10.4.7
FCP 5.0.4
AE 6.5
Reply to this Discussion! Login or Sign Up