Skip navigation
didgi.
Currently Being Moderated

follow a leader with delay

Apr 1, 2010 11:17 AM

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

  • Currently Being Moderated
    Community Member
    Apr 1, 2010 1:51 PM

    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

    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points