Created
May 21, 2018 19:26
-
-
Save azamsharp/1260c2aaedd8e5f4fc45414ab0b3841f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@objc func resolveAnchor() { | |
if let cloudAnchor = try? self.gSession.resolveCloudAnchor(withIdentifier: self.cloudIdentifier) { | |
let box = SCNBox(width: 0.3, height: 0.3, length: 0.3, chamferRadius: 0) | |
let material = SCNMaterial() | |
material.diffuse.contents = UIColor(fromHexString: hex) | |
box.materials = [material] | |
let node = SCNNode(geometry: box) | |
node.position = SCNVector3(cloudAnchor.transform.columns.3.x, cloudAnchor.transform.columns.3.y, cloudAnchor.transform.columns.3.z) | |
self.sceneView.scene.rootNode.addChildNode(node) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment