-
expression toWorld not changing
I’m trying to create an expression that keeps a light always pointed to a location, and has only it’s X position changing to point to a null object which is parented to another layer. That’s a mouthful.
But down to the issue I’m having, and maybe I’m just confused at how this works.
I thought, that toWorld would return an object’s position in world coordinates regardless of the object’s parent. So at any point in time, if you look at toWorld number, you’d see exactly where that anchor point is in the world coordinates.First, my object isn’t going where I expect it to.
Second, it doesn’t move, although the null object Does move.The light’s point of interest has this:
GetX = toWorld(thisComp.layer("SuckSpot").transform.position);
x = GetX[0];
y = GetX[1];
z = transform.position[2];
[x,y,z];The light position has this:
GetX = toWorld(thisComp.layer("SuckSpot").transform.position);
x = GetX[0];
y = transform.position[1];
z = transform.position[2];
[x,y,z]The position, I only need to look at the null object’s X position. But one thing seems odd. I didn’t Add the layer position or anything, so why is it letting me move the object in all 3 axis?
I’m sure it’s something simple, but I’m stuck.