XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : Orient to Camera Script

03-03-2005, 07:48 PM
I need to orient a layer to the camera, that is to always make it face the camera, but my camera has no orientation value's and no target, It has been animated using rotation and position only.

Any ideas on how to write an expression to do this, or where I can get example script tutorial etc.

03-03-2005, 10:35 PM

humm for your problem...

try this expression.....

I'm sorry I can't open AE for now I don't know if this will work

03-03-2005, 11:35 PM
Thanks for putting me on the right track, I thought it would have required a much more complicated approach, I couldnt get your script to work, but I nailed it like this:

myOrientationX = thisComp.layer("Camera 1").rotationX;
myOrientationY = thisComp.layer("Camera 1").rotationY;
myOrientationZ = thisComp.layer("Camera 1").rotationZ;
[myOrientationX, myOrientationY, myOrientationZ]

I actually wanted to just affect the Layers Y Orientation axis so I did this instead:

myOrientationX = 0;
myOrientationY = thisComp.layer("Camera 1").rotationY;
myOrientationZ = 0;
[myOrientationX, myOrientationY, myOrientationZ]

Out of Interest, the way you wrote the script seemed a lot less long winded than my script, is there a better way to write this?

03-04-2005, 04:21 PM
[0, thisComp.layer("Camera 1").rotationY, 0]


03-04-2005, 07:33 PM
That one works, and lots shorter! I think I understand the syntax now!

CGTalk Moderation
03-04-2005, 07:33 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.