ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# shifting the point of interest

FAQ   •   VIEW ALL
 shifting the point of interest on Aug 27, 2018 at 9:01:18 pmLast Edited By Mark Doctor on Aug 28, 2018 at 5:02:13 am

I've placed a 3D-cube in front of AE's camera and it lines up with the 2D-background by using the 3D-camera-tracking. Now I want to zoom in on the cube

By turning the background into a 3D-layer and parent it to the camera-position, I've succeeded to pan and tilt the camera and zoom towards the cube. But...

Once zoomed-out, I need to set the point of interest towards the (constant moving) background. And zoomed-in I need to set the point of interest towards the 3D-cube.

So i was thinking of an expression which gradual transforms between both positions. Like a position-A to -B transformation with a percentage slider that can be key-framed.

But I guess it has been done before and i'm not that great at expressions. Also I maybe overlooked some simpeler solution.

Thanks for any input, Mark

 Re: shifting the point of intereston Aug 29, 2018 at 12:22:04 pmLast Edited By Kalleheikki Kannisto on Aug 29, 2018 at 12:22:46 pm

How about using a position-keyframed 3D null object for the point of interest, pick-whipping the camera POI to it?

Kalleheikki Kannisto
Senior Graphic Designer

 Re: shifting the point of intereston Aug 29, 2018 at 7:11:21 pm

Solved! Key-framing a null wasn't an option; The null would need a key-frame at every frame just like the camera, to keep up with the background parented to the camera.

```//3D point expression: A = thisComp.layer("BackGround"); AW= A.toWorld(A.anchorPoint); //vector expression: A = effect("Point A")("3D Point"); B = effect("Point B")("3D Point"); //vector to B C = B - A; // 1% vector D = effect("Slider Control")("Slider")*C/100; // point A & vector added E = A + D; ```