title: Handling 3D Interaction and UI Controls in Augmented Reality
body: <p>I'm playing with this <a href="https://github.com/DaoKeLegend/Handling-3D-Interaction-and-UI-Controls-in-Augmented-Reality" rel="nofollow noreferrer">Code example</a>.</p>
  
  <p>And I'm having trouble finding where can I replace the existing 3d objects with my own 3d objects programmatically created?</p>
  
  <p>I want to keep all the existing functionality in the code example but with my own objects!  </p>
  
  <blockquote>
    <p>Creating of 3d object.</p>
  </blockquote>
  
  <pre><code> self.geometry = SCNBox(width: width!/110, 
                         height: height!/110, 
                         length: 57 / 700, 
                  chamferRadius: 0.008)
  
   self.geometry.firstMaterial?.diffuse.contents = UIColor.red
   self.geometry.firstMaterial?.specular.contents = UIColor.white
   self.geometry.firstMaterial?.emission.contents = UIColor.blue
   boxnode = SCNNode(geometry: self.geometry)
   boxnode.position = position
   boxnode.rotation = rotation
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/rlSzm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rlSzm.jpg" alt="enter image description here"></a></p>