Try it this way:
x =
thisComp.layer("target");
x.toWorld(x.anchorPoint)[2]
Dan
Sent: Wednesday, November 14, 2012 12:32 PM
Subject: [AE] get z position of parented layer?
I'm
trying to connect a particular emitter point to the position of a 3d null layer.
I normally use the expression Dan Ebberts and other people have written:
x =
thisComp.layer("target");
x.toWorld(x.anchorPoint)
..but since the z
position is split out in particular, I don't know how to connect it.
I
tried:
x =
thisComp.layer("target").transform.position[2];
x.toWorld(x.anchorPoint)
..but
AE gives me an error. Anyone know how to write this?>
thanks