the direction is defined by the normalised vector between `fromValue` and `toValue` - so having a 1D speed suffices.
Conversation
i.e. you can't have an arbitrary initial velocity - only an initial speed approaching towards or retreating from the `toValue`.
2
I understand that this is how it works, but I am curious as to why this decision was made when CA supports n-value animations.
1
that's something I don't know the answer to 🙂
1
Fair :) Does my original question make more sense with the new context?
1
I'd still suggest that the initial velocity is actually the magnitude `initialVelocity` along vector toValue.xy - fromValue.xy
1
So long as you're tossing a view directly towards or away from the target, that's fine.
1
1
that's the only direction a `CASpringAnimation` will animate the view.
2
That being said, it's likely possible to get 2d velocity by using a separate animation for each value. Is just odd API choice.
1
2
curious on your thoughts re: CA spring velocity as a 1d value.
1
I imagine the API would look very different if it were designed today. But yes, vectors decompose; use 2 anims.


