After Effects Expression/Script?


#1

Is there an expression or script in After Effects that can make a null object always face a camera?


#2

I believe that it can be done, if that is what you need, just make Camera to be a Parent to Null Object


#3

Right click Null or 3d layer/transform/Auto-Orient/Orient Towards Camera


#4

Kramz’ method will work fine.

If you need to do it with expressions, then…

cam = thisComp.layer("Camera 1"); //put your camera name here
lookAt(this.position, cam.position);

…on the orientation property of your layer.

Neither of these ‘look at’ methods use a specific ‘up vector’. The way the layer is rotated around the Z axis that faces the camera may be unpredictable. If you need to use an up vector, then you need a much longer expression.

-felt.


#5

Thanks Daniel…Thanks Ben…info helpful as usually…