-
Placing Null In A Circle
Hello,
I’m trying to rig a pie chart in After Effects, I am currently having trouble with placing the nulls for call-outs.
Edit
With some fiddling, I was able to get close to what I wanted to achieve, but now I have this problem:
This is how my expression works:

This is how I wanted it to work:

Here is my expression:
var comp = thisComp;
var ident = name.split(" ")[1];
var init_pos = comp.layer("Super Anchor").transform.position;var degree = comp.layer("Calculator").effect("Angle Per Part")("Slider");
var angle = degreesToRadians(degree) * -ident;
var diameter = comp.layer("Controller").effect("Diameter")("Slider");
var thickness = comp.layer("Controller").effect("Thickness")("Slider");
var radius = (diameter + (thickness / 2)) / 2;var x_position = radius * Math.cos(angle);
var y_position = radius * Math.sin(angle);[init_pos[0] + x_position, init_pos[1] + y_position]
There will be a lot of duplicating, so I tend to put expressions with loops to a slider and get the values from there.
“Angle Per Part” is just 360 / number of layers with the name “Pie Part” in it (in this example, 360 / 6 = 60);
“Ident” is the number assigned to the layer, Callout 01, Callout 02 (hence split(” “)[1])Better yet, is there a way to modify my expressions so that I can freely rotate the entire thing using expression controls?
Thank you.
