Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: ForumAE BasicsAE ExpressionsTutorialsArticlesPodcastsMotion GraphicsTrainingCinema 4D

Rotate away from Camera problem

Cow Forums : Adobe After Effects Expressions
VIEW POSTS   •   ADD A NEW POST   •   SEARCH   •   CHANGE FORUM
Respond to this post   •   Return to posts index   •   Read entire thread


Rotate away from Camera problem
by Brian Charles on Mar 25, 2008 at 12:54:10 am

I'm hoping that someone can spot the error in my script. I have series of layers that rotate as the camera approaches. Some should rotate clockwise others counter clockwise. The start and end rotations as well as the angle are set by expression controls on a master layer. My problem is that the counter clockwise and clockwise rotations are not in sync. I've brute forced a solution but it bugs me that I don't see the reason I need to. There must be an error in the script that eludes me.

Here is my script for the cc rotation (applied to the Y axis):

startR =effect("Rotation Start Distance")("Slider");// start rotation in pixels from camera
endR = effect("Rotation End Distance")("Slider"); // end rotation in pixels from camera
C= thisComp.activeCamera;
P = length(toWorld(anchorPoint),C.toWorld([0,0,0]));
endAngle = effect("Angle Control")("Angle");
ease(P,startR,endR,endAngle,0)

The clockwise script:
//ROTATE CLOCKWISE
startR =thisComp.layer("Master").effect("Rotation Start Distance")("Slider") + 100;// start rotation in pixels from camera
endR = thisComp.layer("Master").effect("Rotation End Distance")("Slider"); // end rotation in pixels from camera
C= thisComp.activeCamera;
P = length(toWorld(anchorPoint),C.toWorld([0,0,0]));
endAngle = (thisComp.layer("Master").effect("Angle Control")("Angle")*-1)// INVERT VALUE;
ease(P,startR,endR,endAngle,0)



You'll note that I've forced the clockwise to behave by adding 100 to the startR value. I have no idea why I need to...






Respond to this post   •   Return to posts index   •   Read entire thread


Current Message Thread:


Related Tags:
Camera



Note: If you are a registered user please click here to login before posting.

Your post will not be accepted if your name and email address are not registered in our database. Click here if you do not have an account.

Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message   Entire Thread   None  

Message:

Add Bold Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd Italic Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd Underline Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd Image Link Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd URL Link Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this button

Note: The following are HTML characters and may cause parts of your post to disappear if not used correctly: < > &
To include any portion of the post in your response, highlight the desired text and hit the "Q" key. Read more...



Please post Expressions Code in the box below:


Add your message signature


 


Note: By clicking "Post Direct" button above, you are agreeing to the Creative Cow's Code of Conduct.



FORUMSTUTORIALSMAGAZINEDVDsBOOKSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]