0

I have four positions in my CAKeyframeAnimation that are part of a bezier path and my animation is working great along the path. But now I need the animated sprite to be moved to one specific value of the keyframe position values. how could I realize that? thnx!

headkit
  • 3,307
  • 4
  • 53
  • 99

1 Answers1

1

Pull the relevant values out of the CAKeyframeAnimation's keyTimes, values, and potentially timingFunctions arrays, then create a CABasicAnimation out of those.

Christian
  • 1,714
  • 8
  • 9
  • thank you for the response! yes, i thought of that. but does the animation follow the path then to get to the keyframe position? – headkit Jun 02 '12 at 10:24
  • No, if you want to do that, follow the same logic, but create an entirely new CAKeyframeAnimation instead, with all of the keyTimes, values, and timingFunctions that you'd want. – Christian Jun 04 '12 at 15:16
  • problem is that the path is a closed bezier curve out of only four points. – headkit Jun 04 '12 at 17:17
  • I know this was a long time ago, but did you figure out a solution @headkit – Elhoej Nov 29 '18 at 00:05
  • I don't remember, sorry. But I guess you need to create more points on the path. – headkit Nov 29 '18 at 09:25