• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Moving background to camera but only at 25%

New Here ,
Jun 12, 2009 Jun 12, 2009

Copy link to clipboard

Copied

I want the background to move with the camera but at a reduce positioning, say 25% of the normal movements. Can this be done?

Thanks for an answers, using AE 7

TOPICS
Expressions

Views

4.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 12, 2009 Jun 12, 2009

Oops. Sorry, I didn't copy and paste the whole thing. This should be better:

P = thisComp.activeCamera.transform.position;
value + (P - P.valueAtTime(0))*0.25

Dan

Votes

Translate

Translate
Community Expert ,
Jun 12, 2009 Jun 12, 2009

Copy link to clipboard

Copied

Probably something like this:

thisComp.activeCamera.transform.position;
value + (P - P.valueAtTime(0))*0.25

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 12, 2009 Jun 12, 2009

Copy link to clipboard

Copied

Thanks Dan, although I am getting an error when I place it on the position of the layer I only want to move 25%.

I get the error 'AE warning: Class 'Layer' has no property named 'P' Expression disabled.'

Have I done something wrong?

Cheers

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2009 Jun 12, 2009

Copy link to clipboard

Copied

Oops. Sorry, I didn't copy and paste the whole thing. This should be better:

P = thisComp.activeCamera.transform.position;
value + (P - P.valueAtTime(0))*0.25

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 13, 2009 Jun 13, 2009

Copy link to clipboard

Copied

Thanks Dan, now no errors, but the layer doesn't seem to slow down at all compared to the background. The expression is placed in the Position property of the layer and the camera parented to a null still makes the layer move at 100%.I have attached the file if you could help me on this.

S

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 13, 2009 Jun 13, 2009

Copy link to clipboard

Copied

Thanks Dan.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 13, 2009 Jun 13, 2009

Copy link to clipboard

Copied

Thanks Dan, no errors now but I have placed the expression on the layer's Postion property and the camera still sees the layer go at 100% compared to the background.

S

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 13, 2009 Jun 13, 2009

Copy link to clipboard

Copied

Ah, if the camera has a parent, this should work better:

C = thisComp.activeCamera;
p0 = C.toWorld([0,0,0],0);
p1 = C.toWorld([0,0,0],time)
value + (p1 - p0)*0.25

Note that you won't see any movement until you animate the camera position over time.

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 13, 2009 Jun 13, 2009

Copy link to clipboard

Copied

Excellent, both answers were great,  didn't realise you had to play the timeline, thanks loads!!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 19, 2009 Jun 19, 2009

Copy link to clipboard

Copied

LATEST

I need to have the same proportion of movements in the rotate properties, what code do you need for this?

Cheers

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines