Order of poses inside the comp : neutral, up, down, left, right.
Each holds one frame only.
Precomp framerate must equal active composition framerate.
neutralSpeed = 50; //pixels pe second, you can modify this
vel = position.velocityAtTime(time);
if (Math.abs(vel[0]) < neutralSpeed && Math.abs(vel[1])< neutralSpeed){
pose = 0;
}else if (Math.abs(vel[0])>Math.abs(vel[1])){
pose = (vel[0]>0) ? 4 : 3;
}else{
pose = (vel[1]>0) ? 2 : 1;
}
framesToTime(pose)
Andrei
My Envato portfolio.