-
calculating a vector to angle with expressions
Hi
I want to make a background for an animation with the cc sphere effect. to make things more complicated i want to connect the camera rotation with the rotation parameters of the cc sphere effect. I used point of interest to animate the rotation it o I need a script to calculate the rotation. Here’s my try. (Its not working properly):
x =thisComp.layer(“Kamera 1”).transform.pointOfInterest[0] – thisComp.layer(“Kamera 1”).position[0];
y =thisComp.layer(“Kamera 1”).transform.pointOfInterest[1] – thisComp.layer(“Kamera 1”).position[1];
z =thisComp.layer(“Kamera 1”).transform.pointOfInterest[2] – thisComp.layer(“Kamera 1”).position[2];wx = radiansToDegrees(Math.atan2(y, z));
wy = radiansToDegrees(Math.atan2(x, z));
wz = radiansToDegrees(Math.atan2(x, y));[wx,wy,wz]
It would also be nice if the background would react to the camera movement.
It doesn’t have to be realistic just to add some depthAny ideas?
with best regards
Clemens