-
Changing Position keyframes but keeping the speed graph
I want to change the keyframe value of the position property if a certain condition is met
x = [100,200]; // my new keyframe1 value
y = [200, 300]; // my new keyframe2 value
If (n==1) // if true change the position keyframe1 and keyframe2
{
v1 = valueAtTime(key(1).time);
v2 = valueAtTime(key(2).time);
linear(time,key(1).time,key(2).time,x,y);
}
else value
This works for me but the above doesnt respect the speed graph. I have a speed graph set on the position, but when i run using the above expression the speed graph is ignored. Its runs in a linear fashion. How do i use both the expression as above and the speed graph.