-
Speed Activated Walk Cycle
Hi there,
I’m trying to create a walk cycle which is activated by the speed expression. have managed to trigger my loop cycle from the speed expression but when it stops I need it to return to a decent rest position. Currently I have two legs which move at opposite rotations and this is applied to one of those legs (relating to the motion of the body).
Code so far (applied to one leg’s rotation):
Bod = thisComp.layer(“Body”).transform.position.speed;
if (Bod >10) loopOut(“pingpong”); else 4;At rest the rotation value is 4, but I’d like at any point when my walker stops for it to get to this value smoothly rather than jumping straight to the rotation value 4. A half way house might be an expression to freeze where the walk is, but as it may look odd for a rest position to be mid-walk I’d rather it gets to a particular value.
I’m just starting to use expressions, but I’m keen to try and make an environment in after effects that eventually has many characters walking around that will avoid each other, stop etc and it would be good to set up a fairly intelligent basis for walking and stopping without key framing dozens of characters.
Any and all help gratefully welcomed.
Many thanks,
DuncBod = thisComp.layer("Body").transform.position.speed;
if (Bod >10) loopOut("pingpong"); else 4;