AE ENHANCERS

Expressions/Scripts/Presets
It is currently Sun May 19, 2013 11:02 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: layer orientation without "lookat"
PostPosted: Fri Aug 08, 2008 12:55 am 
Offline

Joined: Thu Aug 07, 2008 1:39 pm
Posts: 1
Hi,

I have 3 layers A, B, C inside my comp.
In a 3D space, B is positioned between A and C using this basic stuff:
B.position = (A.position+C.position)*.5
Now I would like B to orient towards those layers just like using Lookat(,), but whitout using Lookat(,).
This, because later on, I want B's orientation to depend partly on other variables.

I am a beginner at trigo and Javascript and I get really strange results from my use of Dan Ebbert's stuffs about trigo and inversed kinematics.

Can anyone help ?

Maxime


Top
 Profile  
 
 Post subject: Re: layer orientation without "lookat"
PostPosted: Fri Aug 08, 2008 8:36 am 
Offline

Joined: Fri Dec 07, 2007 10:11 am
Posts: 128
You could always add to the lookAt another angle to change the orientation as you desire such as:

lookAt(A.position,C.position) + [ANGx,ANGy,ANGz]

Where ANGx, ANGy, ANGz are the angles you want to rotate the layer in x,y,z axes respectively, in addition to the exact orientation the lookAt gave you.

I don't know how you want to change the orientation later, but you could use a Slider Control with keyframes to add different values at different times, and this way you could orient the B layer towards A&C at the begining and then change the oreintation as you want using the keyframes at the slider.

(If you need to change all 3 angles (ANGx, ANGy, ANGz), you will need to use 3 Sliders, or use a 3D array expression)

I hope this helped.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group