Created
May 19, 2016 12:50
-
-
Save howiemnet/8b0099619b35fcbfeba53a540c440c2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C = thisComp.layer("Camera"); | |
V = C.toWorldVec([0,0,1]); | |
P = toWorld(anchorPoint); | |
lookAt(P, P + V); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This makes a layer (usually a null, or a text layer etc) face the camera by orienting it to match the camera's orientation in world space. This differs from the built-in "Look At Camera" function, which points a layer's Z axis at the camera's position. The difference is that objects that aren't perfectly central in the frame tend to tilt inwards a little with the built-in function; the code above keeps text [etc] perfectly straight, perfectly in line with the frame.