auto orient expression?

Moderators: Disciple, zlovatt

Post Reply
Varangian
Posts: 38
Joined: December 16th, 2004, 11:15 am

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?
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

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
User avatar
Atomic
Posts: 157
Joined: April 30th, 2007, 5:55 am
Location: United States, Ohio

Nice,

I'm going to have to try that out.
Post Reply