SpriteKit - RotateToAngle
<p>I have an object that I want it to constantly rotate right &amp; left:</p>

<pre><code>override func didMoveToView(view: SKView) {
    /* Setup your scene here */

// I start it facing left side
    object.zRotation = CGFloat(M_PI / 4)
}

 override func update(currentTime: CFTimeInterval) {
        /* Called before each frame is rendered */


        let rotateRight = SKAction.rotateToAngle(CGFloat(-M_PI / 4), duration: 2)
        let rotateLeft = SKAction.rotateToAngle(CGFloat(M_PI / 4), duration: 2)

        let sequence = SKAction.sequence([rotateRight, rotateLeft])

        object.runAction(SKAction.repeatActionForever(sequence))
    }
</code></pre>

<p>The problem is, it only rotates to the right side then it stops completely, it never rotates left and repeate as it should. </p>