-
walk cycle accumulation distance
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.
Sorry, there were no replies found.