FIXED: autocompleted as zPosition instead of zRotation
and I didnt catch it.
Hello,
it seems the following code will not rotate 22.5 degrees as indicated in the book (page 48).
The background image just stays perfectly upright and centered in the middle of the view.
Is there something I’m missing?
class GameScene: SKScene {
override func didMove(to view: SKView) {
self.backgroundColor = SKColor.black
let background = SKSpriteNode(imageNamed: "background1")
background.anchorPoint = CGPoint.zero
background.position = CGPoint.zero
background.zPosition = CGFloat.pi / 8
addChild(background)
}
}