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

I want Expression to follow Layer time NOT comp time

New Here ,
Sep 14, 2018 Sep 14, 2018

Copy link to clipboard

Copied

Hi! I have a simple Expression on the rotation value of a layer. How do I write it so it's triggerd by the layer itself and not the comp it is in.

veloc = 5;

amplitude = 20;

decay = 3;

amplitude*Math.sin(veloc*time)/Math.exp(decay*time)  

Thanx!

Finn, Sweden

TOPICS
Expressions

Views

3.1K

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 , Sep 14, 2018 Sep 14, 2018

Try it this way:

veloc = 5;

amplitude = 20;

decay = 3;

t = time - inPoint;

amplitude*Math.sin(veloc*t)/Math.exp(decay*t)

Dan

Votes

Translate

Translate
Mentor ,
Sep 14, 2018 Sep 14, 2018

Copy link to clipboard

Copied

There is no such thing as layer-time. Time is always global.

What do you want to achieve?

If the decay should be less or more, you can simply multiply time.

You can also play around with poserizeTime() to simulate another framerate.

Cheers,

Martin

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 ,
Sep 14, 2018 Sep 14, 2018

Copy link to clipboard

Copied

Sorry I'm a novice when it comes to expressions but I have a couple i use all the time. Yes I know how to manipulate the movement but the thing is if I apply it to a layer and have the layer start five seconds in to the timeline the movement generated from the expression is lost because it happens before the layer is even visible. I had a version of this expression with some extra code added to it before which made the expression trigger the motion when the layer it was applied to became visible. Unfortunately I lost it in a disc crash so now I want to re create it.

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 ,
Sep 14, 2018 Sep 14, 2018

Copy link to clipboard

Copied

Try it this way:

veloc = 5;

amplitude = 20;

decay = 3;

t = time - inPoint;

amplitude*Math.sin(veloc*t)/Math.exp(decay*t)

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 ,
Sep 14, 2018 Sep 14, 2018

Copy link to clipboard

Copied

LATEST

You are THE MAN Dan!

Exelent!

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