# zPosition Not Rotating? (FIXED)

**URL:** <https://forums.kodeco.com/t/zposition-not-rotating-fixed/33226>\
**Category:** 2D iOS & tvOS Games by Tutorials\
**Created:** [August 12, 2017, 4:59pm UTC](https://forums.kodeco.com/t/zposition-not-rotating-fixed/33226 "2017-08-12T16:59:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![puppet](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/puppet/32/61060_2.png) [@puppet](https://forums.kodeco.com/u/puppet)\
**Post date:** [August 12, 2017, 4:59pm UTC](https://forums.kodeco.com/t/zposition-not-rotating-fixed/33226/1 "2017-08-12T16:59:15Z")

</div>

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)
	}
}

```

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [January 26, 2018, 8:59am UTC](https://forums.kodeco.com/t/zposition-not-rotating-fixed/33226/2 "2018-01-26T08:59:25Z")

</div>

This topic was automatically closed after 166 days. New replies are no longer allowed.
