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
point of interest plus
-
- Posts: 62
- Joined: September 5th, 2006, 3:45 am
- Location: Chiswick, London, UK
- Contact:
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:
Where 50 is your own value for y. Could be another variable also...
Hope this gets you on the right track,
Chris
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]);
Hope this gets you on the right track,
Chris