title: Understand coordinate spaces in ARKit
body: <p>I've read all Apple guides about <a href="https://developer.apple.com/documentation/arkit" rel="noreferrer">ARKit</a>, and watched a <a href="https://developer.apple.com/videos/play/wwdc2017/602/" rel="noreferrer">WWDC video</a>. But I can't understand how do coordinate systems which are bind to:</p>
  
  <ol>
  <li>A real world</li>
  <li>A device</li>
  <li>A 3D scene</li>
  </ol>
  
  <p>connect to each other.</p>
  
  <p>I can add an object, for example a <code>SCNPlane</code>:</p>
  
  <pre><code>let stripe = SCNPlane(width: 0.005, height: 0.1)
  let stripeNode = SCNNode(geometry: stripe)
  scene.rootNode.addChildNode(stripeNode)
  </code></pre>
  
  <p>This will produce a white stripe, which will be oriented vertically, no matter how the device will be oriented at that moment. That means the coordinate system is somehow bound to the gravity! But if I try to print <code>upAxis</code> <a href="https://developer.apple.com/documentation/scenekit/scnscene/scene_attributes" rel="noreferrer">attribute of the SCNScene</a> per frame, it will be the same, no matter how I rotate the iPhone. I also tried to print <code>stripeNode.worldTransform</code> and it also doesn't change.</p>
  
  <p>Any help in understanding <code>ARKit</code> coordinates is welcomed. </p>