Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
harico
Topic Author
Posts: 4
Joined: Thu Dec 06, 2007 6:23 am

point of interest plus

Thu Dec 06, 2007 7:02 am

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
 
Darkmoon_UK
Posts: 62
Joined: Tue Sep 05, 2006 3:45 am
Location: Chiswick, London, UK
Contact:

Thu Dec 06, 2007 3:35 pm

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:

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
 
harico
Topic Author
Posts: 4
Joined: Thu Dec 06, 2007 6:23 am

Fri Dec 07, 2007 3:09 am

thanks

Who is online

Users browsing this forum: No registered users and 3 guests