Forum Replies Created

Page 5 of 10
  • I think a part of the expression turns into “…”
    I’ll change my variable names and re post it…

  • Happened again…. the last two lines are “if(time n){y}”….

    a = thisLayer.inPoint;
    b = timeToFrames(a);
    m = timeToFrames(thisLayer.source.duration) + b – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time n){y}

  • It was the copy/past…
    here it is again :

    a = thisLayer.inPoint;
    b = timeToFrames(a);
    m = timeToFrames(thisLayer.source.duration) + b - 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time n){y}

  • Steve Sierra

    May 4, 2017 at 1:22 pm in reply to: x position move randomly

    Hi,

    You can download DUIK her :

    https://rainboxprod.coop/fr/outils/duik/

    with this tool, you can create Inverse Kinematic hair locks and animate just the controller and get the whole hair lock to move with it.
    There are a bunch of tutorials on DUIK on youtube and vimeo.

    Then, if you want your controllers to move randomely, put this expression in it’s position (“a” is how many wiggles per second, “b” is how many pixels for max wiggle) :

    a = 0.25;
    b = 50;
    x = wiggle(0.25, 50);

    [x[0], transform.position[1]];

    Hope this helps !
    😉

  • Re-cleaned it up :

    a = thisLayer.inPoint;
    b = timeToFrames(a);
    m = timeToFrames(thisLayer.source.duration) + b – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time n){y}

    😉

  • I think I got it :

    a = thisLayer.inPoint;
    b = timeToFrames(thisLayer.inPoint);
    m = timeToFrames(thisLayer.source.duration) +timeToFrames(thisLayer.inPoint) – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time n){y}

    Cheers !

  • You’re right…
    I don’t know why. I’m only getting the In animation.

    I’ll lokk into it when I have some time, unless someone else helps you out.

    Good luck !

  • Oups…

    It’s supposed to be :

    a = thisLayer.inPoint;
    b = timeToFrames(a);
    m = timeToFrames(thisLayer.source.duration) + b – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time = a){
    x
    }else{
    if(time>n){
    y
    }else{
    [960,540];
    }
    }

    I put b in the if condition instead of a… interchanged those varibles at the last minute 😉

  • Hi,

    I think this is what you need :

    a = thisLayer.inPoint;
    b = timeToFrames(a);
    m = timeToFrames(thisLayer.source.duration) + b – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    x = ease(time ,a, a+p, [960, -540], [960, 540]);
    y = ease(time ,n, n+p, [960, 540], [960, -960]);

    if(time = b){
    x
    }else{
    if(time>n){
    y
    }else{
    [960,540];
    }
    }

    Cheers 😉

  • Hi again,

    I think you could put this in the placeholders’ positions :

    m = timeToFrames(thisLayer.source.duration) + timeToFrames(thisLayer.inPoint) – 20;
    n = framesToTime(m);
    p = framesToTime(20);
    y = ease(time ,n, n+p, [960, 540], [960, -540]);

    if(time>n){
    y
    }else{
    [960,540];
    }

    Cheers !

Page 5 of 10

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy