I have a sub-layer keyframe animation defined to animate an image along a BSpline, grouped together with a rotate animation. With the sub-layer.speed set to 0, I can drag the image back and forth along the curve by adjusting the animationsGroup.timeOffset value based on the distance dragged. What I want to do is, after a certain threshold (say %15) is to set the animation speed to 1 so the animation completes by itself, but it's not that simple. The animation either completes immediately and resets everything back to the start position, or the animiation reaches the end of the path, loops round to zero, and continues animating until it's back to the point where the animation kicks in.
What I want is:
Tstart -> drag -> T0.15 -> animation -> Tend
But what I'm getting is
Tstart -> drag -> T0.15 -> animation -> Tend -> Tstart -> T0.15
I've already looked into use of timeOffset and time-warps, and fiddled with the parameters but to no avail.