title: SceneKit – Camera does not see a model when rendering in SwiftUI
body: <p>I have a USDZ model that when imported in to SceneKit scene graph shows fine, if I set the preview to show from the cameras perspective it is in frame. However when I run it via SwiftUI preview, on simulator or on device it does not render. I've turned on camera controls on the simulator to look over the scene and it's simply not rendering rather than out of frame.</p>
  <p><a href="https://i.stack.imgur.com/lSJeZm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lSJeZm.jpg" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/Y4ktxm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y4ktxm.png" alt="enter image description here" /></a></p>
  <pre><code>import SceneKit
  
  struct HomeScreen: View {
      private var userDefaults: UserDefaults?
      var scene = SCNScene(named: &quot;MyScene.scn&quot;)
      var cameraNode: SCNNode? {
          scene?.rootNode.childNode(withName: &quot;camera&quot;, recursively: false)
      }
      var body: some View {
          VStack {
              
              SceneView(
                  scene: scene,
                  pointOfView: cameraNode,
                  options: [.allowsCameraControl]
              )
          }
      }
  }
  
  struct SwiftUIView_Previews: PreviewProvider {
      static var previews: some View {
          HomeScreen()
      }
  }
  </code></pre>