-
Use ease() expression with for loops
Hello everyone!
I try to use “for” loop statement to create an expression with ease().
Here is an example.I need to execute it for three times with three objects: Name1, Name2 and Name3, but it doesn’t work.
I get only last interaction with Name3 object.Can you suggest me how can I execute ease() statement for three times with for loop?
for (i = 1; i < 4; i++){
startM = thisComp.marker.key(1).time;
stopM = thisComp.marker.key(2).time;
xInPos = thisComp.layer("Name " + i).transform.position[0];
yInPos = thisComp.layer("Name " + i).transform.position[1];
xOutPos = thisComp.layer("Name " + (i+1)).transform.position[0];
yOutPos = thisComp.layer("Name " + (i+1)).transform.position[1];
x = ease(time, startM, stopM, xInPos, xOutPos);
y = ease(time, startM, stopM, yInPos, yOutPos);
[x, y, value]
}