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

follow a leader with delay

Guest
Apr 01, 2010 Apr 01, 2010

Copy link to clipboard

Copied

hi

i have bunch of layers all distributed in z space.All in a row.So,they have all differenent position data.

Now the first layer starts to move towards the camera.After a specific time i.e 1.5 secs i want to move the second layer to move with the first one.etc.

thisComp.layer(thisLayer,-1).position.valueAtTime() doesn't work.

something similar to this>

start = 0; //start time of template motion
end = 4.0; //end time of template motion

t = thisComp.layer("template");
offset = (t.effect("offset")("Slider")/100)*(index -1);
travel = linear(t.effect("travel")("Slider")/100,start,end);
t.position.valueAtTime(travel - offset)

any ideas?

cheers

TOPICS
Expressions

Views

2.6K

Likes

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 , Apr 01, 2010 Apr 01, 2010

Try this and see if it's close:

L = thisComp.layer("leader");
delay = 1.5;
timeToStart = 0;
myDelay = (index - L.index)*delay;
t = time - (timeToStart + myDelay);
if (t > 0){
  delta = L.transform.position.valueAtTime(t) - L.transform.position.valueAtTime(timeToStart);
  value + delta
}else{
  value
}

Dan

Likes

Translate

Translate
Community Expert ,
Apr 01, 2010 Apr 01, 2010

Copy link to clipboard

Copied

Try this and see if it's close:

L = thisComp.layer("leader");
delay = 1.5;
timeToStart = 0;
myDelay = (index - L.index)*delay;
t = time - (timeToStart + myDelay);
if (t > 0){
  delta = L.transform.position.valueAtTime(t) - L.transform.position.valueAtTime(timeToStart);
  value + delta
}else{
  value
}

Dan

Likes

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
Guest
Apr 07, 2010 Apr 07, 2010

Copy link to clipboard

Copied

LATEST

cheers it works

Likes

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