AE ENHANCERS

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

 All times are UTC - 8 hours [ DST ]

 Page 1 of 1 [ 2 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: layer orientation without "lookat"Posted: Fri Aug 08, 2008 12:55 am

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

 Post subject: Re: layer orientation without "lookat"Posted: Fri Aug 08, 2008 8:36 am

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

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 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 forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ Announcements    Announcements Expressions    Expressions Library    Expressions Tutorials    Expression Discussion Scripts    General Scripts Library    Script Tutorials    Scripts Discussion    Script requests User Scripts    Paul Tuersley's Scripts    Impudent 1's Scripts Animation Presets    Animation presets Library