2

I want to put 3D Spectacles model in human's eye using face/eye detection and it should be movable as face moves like Snapchat does. I have loaded the 3D .obj model in view but I can not able to change the rotation angle, coordinates and zoom value of 3D SCNNode programatically. Can you please let me know how to change all these characteristics of 3D SCNNode.

Thanks in advance.

Viral Mithani
  • 313
  • 4
  • 17

1 Answers1

0

Should be able to do this programatically. I have used something like this:

        node.scale = SCNVector3Make(scale.x, scale.y, scale.z)
        node.eulerAngles = SCNVector3Make(euler.x, euler.y, euler.z)
        node.position = SCNVector3Make(position.x, position.y, position.z)

        DispatchQueue.main.async {
            SCNTransaction.begin()
            self.scene.rootNode.addChildNode(node)
            SCNTransaction.commit()
        }
cnbecom
  • 166
  • 1
  • 8