Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Linking CC sphere to camera motion

  • Linking CC sphere to camera motion

  • Steve Dorsey

    January 12, 2009 at 8:59 pm
    lookAt(thisComp.activeCamera.position, position)[0]
    lookAt(thisComp.activeCamera.position, position)[1]
    lookAt(thisComp.activeCamera.position, position)[2]

    Okay, please bear with me here. I’m (clearly) not an expressions guy, but I need to get this done asap.

    I have a comp where I’m using CC sphere to “be” inside a spherical background. I want the background to move when the camera moves.

    I posted to the adobe forums, and I got back a reference to a YouTube movie

    https://www.adobeforums.com/webx/.59b77e3d/1

    That script got me half way there.

    My camera is parented to a null which is animated. The camera actually has no keyframes or expressions applied to it.

    The current expression is applied to the CCsphere X Y and Z rotation attributes and links to the camera position:

    lookAt(thisComp.activeCamera.position, position)[0]
    lookAt(thisComp.activeCamera.position, position)[1]
    lookAt(thisComp.activeCamera.position, position)[2]

    This is great, but I need it to be linked to the rotation of the camera’s null, not the position of the camera. I’m trying to figure this out with no success. Any ideas?

    Thanks

    ———-S

  • Dan Ebberts

    January 12, 2009 at 11:03 pm

    Try changing your expressions to this:

    lookAt(thisComp.activeCamera.toWorld([0,0,0]),position)[0]

    lookAt(thisComp.activeCamera.toWorld([0,0,0]),position)[1]

    lookAt(thisComp.activeCamera.toWorld([0,0,0]),position)[2]

    Dan

  • Trent Armstrong

    January 14, 2009 at 6:33 pm
    cam = -thisComp.layer("Camera 1").transform.xRotation;
    nul = -thisComp.layer("Null 2").transform.xRotation;
    cam + nul

    Not trying to interfere with the genius of Dr. Ebberts, but the following code worked for me pretty well.

    Trent

    Trent Armstrong – Creative Cow Leader
    https://www.dallasaeug.com

Viewing 1 - 3 of 3 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy