3D Position with Expressions

Understand the code
Post Reply
Posts: 20
Joined: May 21st, 2004, 3:03 pm

Problem : How to make an object follow another object in only 1 of the 3 dimensions (X, Y or Z) and leave the other two as is.

Solution (posted by Paul Tuersley on AE List September 17 2002)

otherposition = this_comp.layer("name of the other layer").position;
[position[0], position[1], otherposition[2]];

[0], [1], and [2] relate to the x, y and z values contained in a three
dimensional property. So we're defining each one separately, but
putting them back together in the format [x, y, z].
Post Reply