ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Multiple objects to move in a clockwise circle

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jodie ThompsonMultiple objects to move in a clockwise circle
by on Jun 28, 2013 at 10:25:37 am

Hi

I have 5 icons which are are positioned to create a circle. I would like all of these icons to move slowly in a clockwise direction. I have found an expression:

(radius=300
angle=time*55
x=radius*Math.cos(degreesToRadians(angle))
y=radius*Math.sin(degreesToRadians(angle))
z=0
centre=[960,540,0]
add(centre,[x,y,z])

to link one of the icons to a null object, which moves perfectly, but not sure how all icons can link to this null object with them being in different start positions?


Return to posts index

Kevin CampRe: Multiple objects to move in a clockwise circle
by on Jun 28, 2013 at 11:10:57 pm

with the expression, you shouldn't need to link the layer to a null, you can apply the expression to the layer's position property directly, and the layer will rotate around the 'centre' value in the expression.

if you wanted each layer to have a different start position you could add an offset value to the expression, and alter that for each layer.

something like this should work:
radius=300;
rate=55;
offset=60;
angle=time*rate+offset;
x=radius*Math.cos(degreesToRadians(angle));
y=radius*Math.sin(degreesToRadians(angle));
z=0;
centre=[960,540,0];
add(centre,[x,y,z])

the offset value would be in degrees, just modify that as needed.

if you wanted to link the 'centre' value to a null, you could change that part of the expression to something like this:
centre=thisComp.layer('Null 1').position
where 'Null 1' woudl be the name of your null layer.

Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW


Return to posts index

Jodie ThompsonRe: Multiple objects to move in a clockwise circle
by on Jul 1, 2013 at 10:33:27 am

Hi

Thanks so much for your help, that works perfectly.
How would I then add pause points to the rotating icons?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]