Reputation: 419
let's imagine I have a SKSprite node. for reference, I will give an example:
let rect = SKSpriteNode(color: UIColor.blue, size: CGSize(width: 50, height: 300))
rect.position.x = self.frame.midX
rect.position.y = self.frame.midY
self.addChild(rect)
so you can imagine it is a thin tall blue rectangle. How would I go about animating the node to bend the middle part from left to right and repeat infinitely?I will provide a image to give a more clear understanding:
Sorry if the quality of the images is bad. The only thing is that I want it to animate, Otherwise I could have used static images.
Any help would be appreciated, thanks.
Upvotes: 1
Views: 461
Reputation: 2840
Maybe you should use warpGeometry
I don't know if your runforever create a bad performance.
check the documentation
Upvotes: 5