2d layer takes camera position

Moderators: Disciple, zlovatt

Post Reply
User avatar
Disciple
Posts: 137
Joined: June 5th, 2004, 8:05 am
Location: Los Angeles, CA
Contact:

I have a 3d camera that has some expressions applied to it to make it behave in a handheld fashion. I have one 2d layer amidst my 3d layers that needs to stay 2d for multiple reasons. Is there a way I can have it react to the camera's motion somehow? It is very slight, but visible somehow....

Thanks
Alex
benroll

The problem is that a 2D layer has no depth setting, so the camera wouldn't know where to place it.

But what you could do is create a 3D null layer and place it in space where the 2D layer's anchorPoint would be in 3D space if it were a 3D layer.

Now put the following expression on the position of the 2D layer.

Code: Select all

L = thisComp.layer("my 3D null layer"); //or whatever you want to call it.
L.toComp(L.anchorPoint);
From the camera's point of view, the anchorPoint of the 2D layer and the anchorPoint of the 3D null will always line up, even though one is 2D and one is 3D.

-Ben.
User avatar
Disciple
Posts: 137
Joined: June 5th, 2004, 8:05 am
Location: Los Angeles, CA
Contact:

Very cool, thanks Ben
Post Reply