0 Replies
      Latest reply on May 24, 2018 10:53 PM by sukeshj
      sukeshj Level 1 Level 1 (0 points)

        Hi,

        In AR view many fonts are not getting applied, any solution for this or this is known issue? I am using ARKit + scene kit.

         

         

            func addtextnode() {

              

                let physicsBody = SCNPhysicsBody(type: .static, shape: nil)

                let textGeometry = SCNText(string: "My String", extrusionDepth: 0.8)

                textGeometry.font = UIFont(name: "PermanentMarker-Regular", size: 1)

                textGeometry.firstMaterial!.diffuse.contents = UIColor.init(red: 27/255, green: 98/255, blue: 52/255, alpha: 1)

                let (min, max) = textGeometry.boundingBox

                let dx = min.x + 0.5 * (max.x - min.x)

                let dy = min.y + 0.5 * (max.y - min.y)

                let dz = min.z + 0.5 * (max.z - min.z)

                let centertextnode = SCNNode(geometry: textGeometry)

                centertextnode.pivot = SCNMatrix4MakeTranslation(dx, dy, dz)

                centertextnode.worldPosition = SCNVector3(0.01,0.2,-1.2)

                centertextnode.scale = SCNVector3(0.1,0.1,0)

                centertextnode.physicsBody = physicsBody

                scnview.scene.rootNode.addChildNode(centertextnode)

          }