title: Using SK3DNode to show a SceneKit particle object in SpriteKit
body: <p>I've seen that SceneKit contains a nice 3D starfield particle effect:</p>
  
  <p><img src="https://i.stack.imgur.com/p3xiY.png" alt="enter image description here"></p>
  
  <p>I've tried to use a SK3DNode to add this particle effect to my background.
  Here's my code:</p>
  
  <pre><code>    import SpriteKit
      import SceneKit
  
      class GameScene: SKScene {
  
      override func didMoveToView(view: SKView) {
  ...
  
        addStarfield()
      }
  
  
  
      func addStarfield() {
          // create a new scene
          let scene = SCNScene()
  
          // create and add a camera to the scene
          let cameraNode = SCNNode()
          cameraNode.camera = SCNCamera()
          scene.rootNode.addChildNode(cameraNode)
  
          // place the camera
          cameraNode.position = SCNVector3(x: 0, y: 0, z: 15)
  
          let ps = SCNParticleSystem(named: "Stars.scnp", inDirectory: "")
          scene.rootNode.addParticleSystem(ps)
  
          let starFieldNode = SK3DNode()
          starFieldNode.scnScene = scene
          starFieldNode.zPosition = -100
          self.addChild(starFieldNode)
      }
  }
  </code></pre>
  
  <p>Unfortunately this doesn't work. I only see a gray background without stars. Also my normal SpriteKit sprites are no longer visible.</p>
  
  <p>What have I done wrong?</p>
  
  <p>Thanks for your help,
  Stefan</p>