1 Reply
      Latest reply on Apr 20, 2018 1:22 PM by philippMB
      poldigoldi Level 1 Level 1 (0 points)

        Hi everyone!

         

        I am new to ARKit and have encountered a problem that I cannot get my head around.

         

        I previously placed boxes, rings, pyramids from the Scene kit to a fixed position using the following code:

         

             let node = SCNNode()

             node.geometry = SCNBox(width: 0.1, height: 0.1, length: 0.1, chamferRadius: 0)

             node.position = SCNVector3Make(0.1, 0.1, -0.1)

             self.sceneView.scene.rootNode.addChildNode(node)

         

        This worked fine and a box appeared at a fixed position.

         

         

        I then want to insert some text or label using this code:

         

             let node = SCNNode()

             node.geometry = SCNText(string: "Hello World", extrusionDepth: 0.1)

             node.position = SCNVector3(-50,-5,-50)

             self.sceneView.scene.rootNode.addChildNode(node)


         

        I can see the text in front of me, however it moves with the phone in the vertical and horizontal direction rather than staying at a fixed position in comparison to the origin.

         

        Is there a step that I missed?

         

         

        Any help would be greatly appreciated!

         

         

        Many thanks,

        Leo