Expressions/Scripts/Presets

 
malex
Topic Author
Posts: 20
Joined: Fri May 21, 2004 3:03 pm

3D Position with Expressions

Mon May 24, 2004 2:38 am

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].

Who is online

Users browsing this forum: No registered users and 1 guest