Page 1 of 1

auto orient expression?

Posted: August 7th, 2007, 6:28 pm
by Varangian
using an expression, is there a way to auto orient ONLY a layers Y-Rotation to the camera?

basically I have a camera drifting through a maze of bottles. As the camera moves through the bottles, the layers are flat obviously, I would like them to stay turned to the camera, but NOT tilt down (x-rotation)

can an expression handle this?

Posted: August 8th, 2007, 6:24 am
by Dan Ebberts
This should do it:

delta = toWorld(anchorPoint) - thisComp.activeCamera.toWorld([0,0,0]);
radiansToDegrees(Math.atan2(delta[0],delta[2]))


More info here:

http://www.motionscript.com/design-guid ... -only.html

Dan

Posted: August 9th, 2007, 5:43 am
by Atomic
Nice,

I'm going to have to try that out.