-
Making a light orbit a point in 3D space
Hello all,
I have a comp where I want a light to orbit the very centre (in this case 480,360,0) in a circle of radius r, and the orbit shifts over time (so if the light left a trail of infinite-life particles, a sphere would gradually build up around the centre point). I’ve tried to convert the light’s x,y,z coordinates into spherical polar coordinates, but it didn’t work out and I don’t know enough of AE expressions to get it right. Essentially, in the Position field I put the code below, but it gives an error…rho = Math.sqrt(value[0]*value[0] + value[1]*value[1] + value[2]*value[2]);
phi = Math.atan(value[1]/value[0]);
theta = Math.acos(rho/phi);
[rho, phi, theta]