Parallax Drift

Creates a parallax-style drift by shifting the layer relative to 3D camera movement.

Code

depth = 1000;
cam = thisComp.activeCamera;
if (cam) {
  dist = length(position, cam.position);
  factor = dist/depth;
  [value[0]*factor, value[1]*factor, value[2]*factor];
} else {
  value;
}
parallaxdrift3Danimation

How to Use

Apply to a 3D layer's Position property. Deeper layers move more subtly than closer ones, producing a sense of depth with camera movement.