Page 1 of 1

point of interest plus

Posted: December 6th, 2007, 7:02 am
by harico
Hello,

trying to attach source point of shine to point of interest of camera, which i have manged to do using pickwick.

however i wanted to adjust the y value and have got stuck

this is the code

src=thisComp.layer("Camera").transform.position

Posted: December 6th, 2007, 3:35 pm
by Darkmoon_UK
Hi Harico,

In the code you already have, src is given a 3 element Array containing the X, Y and Z values of the Camera position.

What you want to do is take the X and Z from that and put your own Y in. So, construct a new 3 element Array, where the X and Z elements are picked from the existing Array like this:

Code: Select all

src = new Array(thisComp.layer("Camera").transform.position.value[0], 50, thisComp.layer("Camera").transform.position.value[2]);
Where 50 is your own value for y. Could be another variable also...

Hope this gets you on the right track,

Chris

Posted: December 7th, 2007, 3:09 am
by harico
thanks