Mailing List AE-List@media-motion.tv ? Message #51681
From:
Robert Kjettrup <robert@stvmayday.dk>
Subject:
Re: [AE] Expression to orient a layer to same direction a Camera
Date:
Tue, 19 Nov 2013 21:49:48 +0100
To:
After Effects Mail List <AE-List@media-motion.tv>
Ok... i got the paralell orientation to work like i wanted, but have now stumbled over another problem related to this.
I now need it to work with the camera parented to a null. Should be relatively simple, right?
use toWorld to get the absolute position of the camera set as a child of the 3d null, or that is how i understood that toWorld worked. But i cant get it to return the correct values.
Put the following expression on a 3d Point Control on any layer, and have a 3d camera parented to a 3d null.
cam = thisComp.activeCamera;
cam.toWorld(cam.position)
this gives back some position that seems totally wrong.
I have tried toWorld, fromWorld, toWorldVec... etc and nothing gives back the absolute position of the camera in the world space.
Is there something i just dont understand with this, or???
Just use the built in expression function LookAt, but put in the camera position and its target into the fromPoint and atPoint instead of the layers own position and the camera position.
Of course i figure this out soon after i had sent the mail before after having struggled with way too complex expressions :-D
just a head-up to anyone that might find this useful info :-)