Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions walk cycle accumulation distance

  • walk cycle accumulation distance

    Posted by Adrian Germain on July 15, 2009 at 4:21 pm

    Hi.
    I’m trying to animate a character and so far i made the whole movement to look realistic. Now, i have a problem with the distance he walks.
    Because it is symmetrical designed i set the angle of the right upper leg to a null slider and after i have applied this expression to the null position that have parented the character.

    t=degreesToRadians(comp(“right foot”).layer(“Null 1”).effect(“upper leg angle”)(“Slider”));
    m=2*effect(“distance factor”)(“Slider”)*Math.tan(t);
    [transform.position[0]+m,transform.position[1]]

    i need to mention that instead of calculating the distance from the anchor of the leg to the floor i decided to tweak a slider named distance factor.

    now it comes the problem. i think i need an expression related to accumulation not to have this ping-pong move. i remember Dan helped me one time with something similar:

    accum = 0;
    f = Math.round(time/thisComp.frameDuration);
    for (i = 0; i
    t = i*thisComp.frameDuration;
    accum += m.valueAtTime(t);
    }
    where m is the distance.

    i don’t figure how to adapt this>
    many thanks for any help.

    Adrian Germain replied 16 years, 10 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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