aranchor

SpriteKit SKLabelNode attached to ARAnchor doesn't appear or appears fullscreen

会有一股神秘感。 提交于 2021-02-11 12:47:20
问题 I'm adding an anchor to my sceneView in the world origin position: let configuration = ARWorldTrackingConfiguration() sceneView.session.run(configuration) sceneView.session.add(anchor: ARAnchor(name: "world origin", transform: matrix_identity_float4x4)) sceneView.presentScene(SKScene()) I then choose to show a SKLabelNode at my anchor position func view(_ view: ARSKView, nodeFor anchor: ARAnchor) -> SKNode? { // Create and configure a node for the anchor added to the view's session. let

Adding 3D object to ARGeoAnchor

拥有回忆 提交于 2020-12-13 05:40:08
问题 Please forgive me if this question is not that great. I've hit a bit of a road block on Apple's documentation of ARGeoAnchor. Currently ARGeoAnchor just shows a blue dot in the AR Scene View. I'm trying to show any 3d rendereing or object instead. My code: let coordinate = CLLocationCoordinate2D(latitude: lat, longitude: lng) let geoAnchor = ARGeoAnchor(name: "Point 1", coordinate: coordinate) let boxGeometry = SCNBox(width: 0.1, height: 0.1, length: 0.1, chamferRadius: 0) let cube = SCNNode

Check whether the ARReferenceImage is no longer visible in the camera's view

非 Y 不嫁゛ 提交于 2019-12-31 08:51:33
问题 I would like to check whether the ARReferenceImage is no longer visible in the camera's view. At the moment I can check if the image's node is in the camera's view, but this node is still visible in the camera's view when the ARReferenceImage is covered with another image or when the image is removed. func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) { guard let node = self.currentImageNode else { return } if let pointOfView = sceneView.pointOfView { let isVisible =

SceneKit nodes aren't changing position with scene's root node

北城以北 提交于 2019-12-05 04:02:26
问题 I'm using SceneKit with ARKit, and right now have a simple app where I tap on the screen and it adds an ARAnchor and a SCNNode to my scene. At some point, I'm going to want to move the entire scene, so I tried changing sceneView.scene.rootNode.position.x += 10 to test this out. If I call this on any particular node, that node does move appropriately. But calling this on rootNode , nothing happens, where I'd expect every child node (which is every node in the scene) to move along with it. Why

SceneKit nodes aren't changing position with scene's root node

 ̄綄美尐妖づ 提交于 2019-12-03 20:43:06
I'm using SceneKit with ARKit, and right now have a simple app where I tap on the screen and it adds an ARAnchor and a SCNNode to my scene. At some point, I'm going to want to move the entire scene, so I tried changing sceneView.scene.rootNode.position.x += 10 to test this out. If I call this on any particular node, that node does move appropriately. But calling this on rootNode , nothing happens, where I'd expect every child node (which is every node in the scene) to move along with it. Why are my other nodes not moving appropriately, and is there something I can do to fix this? Or am I

Check whether the ARReferenceImage is no longer visible in the camera's view

耗尽温柔 提交于 2019-12-02 17:15:23
I would like to check whether the ARReferenceImage is no longer visible in the camera's view. At the moment I can check if the image's node is in the camera's view, but this node is still visible in the camera's view when the ARReferenceImage is covered with another image or when the image is removed. func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) { guard let node = self.currentImageNode else { return } if let pointOfView = sceneView.pointOfView { let isVisible = sceneView.isNode(node, insideFrustumOf: pointOfView) print("Is node visible: \(isVisible)") } } So I

What is ARAnchor exactly?

◇◆丶佛笑我妖孽 提交于 2019-11-27 06:22:17
问题 I'm trying to understand and use ARKit. But there is one thing that I cannot fully understand. Apple said: A real-world position and orientation that can be used for placing objects in an AR scene ...but that's not enough. What is ARAnchor exactly? What are the differences between anchors and feature points? Is ARAnchor just part of feature points? And how does ARKit determines its anchors? 回答1: Merely saying, ARAnchor is an invisible null-object that can hold a 3D content (at anchor's