How to load a usdz
model and textures from a remote server using ARKit?
As in the example below:
let myURL = NSURL(string: "https://mywebsite.com/vase.scn")
guard let scene = try? SCNScene(url: myURL! as URL, options: nil) else {
return
}
let node = scene.rootNode.childNode(withName: "vase", recursively: true)
let transform = queryResult.worldTransform
let thirdColumn = transform.columns.3
node!.position = SCNVector3(thirdColumn.x, thirdColumn.y, thirdColumn.z)
self.sceneView.scene.rootNode.addChildNode(node!)
I found solution as in the below:
Download model and save
Load usdz model and textures