you can use a the linear() function to try and interpret rotation as position. something like this as the position expression would move a layer as a the 3d ‘rotation layer’ turns on the x and y axis:
x = linear(thisComp.layer(“rotating layer”).transform.yRotation, -45, 45, 0, 720);
y = linear(thisComp.layer(“rotating layer”).transform.xRotation, -45, 45, 480, 0);
[x, y]
it takes the rotation values between 90 degrees (-45 – 45 = 90) and plots that value over a 0-720 px (the comp width) horizontally and 480-0 px vertically… you would like to know the camera’s viewing angle so you could use that to define the rotation — in my expression i arbitrarilly used 90, but if your veiwing anlg was 60, the values might be -30, 30.
using this will most likely require some trial and error to get values that will seem natural.
do you think you’d be better off using the 3d camera data on a 3d camera and position your layers in 3d space? you should get more realistic movement in you scene.
Kevin Camp
Designer – KCPQ, KMYQ & KRCW