Moderators: Disciple, zlovatt

Post Reply
Posts: 1
Joined: May 14th, 2009, 11:10 am

Hi there,
Im using this script on a psd file i imported:

cam = this_comp.active_camera;
distance = length(sub(position , cam.position));
s = distance / cam.zoom;
mul(scale, s)

it should maintain the layer size in the comp no matter where i put it in z position. Not working for me: should i apply it to the layer position or scale property?

Anyone who knows that script can give me some pointers?

Posts: 128
Joined: December 7th, 2007, 10:11 am

Hi atropper,
I hope this is still relevant for you...

This expression works fine for me!
You should give this expression to the Scale propery.

Make also sure you have:
1. a camera in the comp
2. your layer (the one you've given this expression to) is a 3D layer.
4. you are viewing the comp through the Active Camera (and not tny Custom View or Front camera)

Post Reply