Copy link to clipboard
Copied
I need to rotate a point reference in a effect
around another point (that is another effect point reference)
keep the second one fixed and make a perfect cicle path.
In other words:
i have an effect applied to a layer
this effect has an reference point
how to rotate around another reference point?
thanks for help
Copy link to clipboard
Copied
Say you have two lens flares applied to the same layer. Assuming you want to
control the angle of the second flare relative to the first flare with an
Angle Control, you could use an expression like this for the second flare's
center point:
angle = effect("Angle Control")("Angle");
p1 = toComp(effect("Lens Flare")("Flare Center"));
p2 = toComp(value);
delta = p2 - p1;
radius = length(p2,p1);
a = Math.atan2(delta[1],delta[0]);
newAngle = a + degreesToRadians(angle);
x = radius*Math.cos(newAngle);
y = radius*Math.sin(newAngle);
Dan
Copy link to clipboard
Copied
thank for your time, Dan.
wouldnt it be a way to link each (effect) center point to a dummy
and rotate each dummy around the other anchor point?
Copy link to clipboard
Copied
Sure. In that case you would attach each effect point like this:
fromComp(thisComp.layer("Null 1").toComp([0,0,0]))
Dan
Copy link to clipboard
Copied
To a expressions novice like me,
your first expression was certainly a stuff to keep and study to learn.
But i have to thank you for the second tip: very precious to me - be sure - and useful for many things here.
I think i cant live no more without fromComp.
Copy link to clipboard
Copied
fromComp
thisComp
toComp