title: How do I programmatically move an ARAnchor?
body: <p>I'm trying out the new ARKit to replace another similar solution I have. It's pretty great! But I can't seem to figure out how to move an ARAnchor programmatically. I want to slowly move the anchor to the left of the user.</p>
  
  <p>Creating the anchor to be 2 meters in front of the user:</p>
  
  <pre><code>        var translation = matrix_identity_float4x4
          translation.columns.3.z = -2.0
          let transform = simd_mul(currentFrame.camera.transform, translation)
  
          let anchor = ARAnchor(transform: transform)
          sceneView.session.add(anchor: anchor)
  </code></pre>
  
  <p>later, moving the object to the left/right of the user (x-axis)...</p>
  
  <pre><code>anchor.transform.columns.3.x = anchor.transform.columns.3.x + 0.1
  </code></pre>
  
  <p>repeated every 50 milliseconds (or whatever).</p>
  
  <p>The above does not work because transform is a get-only property. </p>
  
  <p>I need a way to change the position of an AR object in space relative to the user in a way that keeps the AR experience intact - meaning, if you move your device, the AR object will be moving but also won't be "stuck" to the camera like it's simply painted on, but moves like you would see a person move while you were walking by - they are moving and you are moving and it looks natural. </p>
  
  <p>Please note the scope of this question relates only to how to move an object in space in relation to the user (ARAnchor), not in relation to a plane (ARPlaneAnchor) or to another detected surface (ARHitTestResult).</p>
  
  <p>Thanks!</p>