How do I change just the starting point of an existing UIBezierPath? .. and leave all other points the same?
I have definitely seen many posts on how to do this .. honestly, I just do not understand many of them
My existing path has one .move(to:)
and many .addLine(to:)
My goal is:
(1) replace the .move(to:)
with .addLine(to:)
and then
(2) change one of the .addLine(to:)
with .move(to:)
All other CGPoints
stay the same.
In order to get the new starting point, I set:
savedPathPoint = myPath.currentPoint
when I stop the following motion.
At some point, I want to resume this following motion with the new starting point = savedPathPoint
via
myPath.move(to: savedPathPoint)
let myAction = SKAction.follow(
myPath.cgPath,
asOffset: false,
orientToPath: true,
duration: 0.1)
mySprite.run(myAction)
When I look at the above problem description, it really appears simple.
Nevertheless, its implementation alludes me.
Thanks bunches in advance for any hints whatsoever.