Posts

Post not yet marked as solved
0 Replies
101 Views
Hi everyone I'm trying to build an ARKit app that displays different scene.scn based on the image tracked. I already set the ImageTrackingConfiguration() and set the AR Resource folder. I builded two different scenes and I want to know the best practice to work with multiple scenes. I also read that many work on the node instead of the scene. override func viewDidLoad() {         super.viewDidLoad()         sceneView.delegate = self         sceneView.autoenablesDefaultLighting = true         let primaScene = SCNScene(named: "art.scnassets/prima.scn")         let secondaScene = SCNScene(named: "art.scnassets/seconda.scn")         primoNode = primaScene?.rootNode         secondoNode = secondaScene?.rootNode     }     later I'm trying to call a switch case to load the right scene based on the referenceImage.name property var shapeNode: SCNNode?         switch imageAnchor.referenceImage.name{         case CaffeType.deca.rawValue:           shapeNode = primoNod             case CaffeType.passionale.rawValue:                 shapeNode = secondoNode             default:                 break             } bottom enum for the img name string  enum CaffeType : String {         case deca = "cialda_deca"         case passionale = "cialda_passionale"     }
Posted
by BixLord.
Last updated
.
Post not yet marked as solved
0 Replies
321 Views
Hi everyone , just started to have a look about XCode and SWIFT unite and after creating my struct ContentView: view i wanted to put a BTN that start he AR experience (with the function to scan an element from a voucher) Btw i didn't manage to start the camera opening with the press of the Btn. Knowing that this is a very basic question i ll ty in advice who is gonna spend some time for an ansewr.
Posted
by BixLord.
Last updated
.