I need to display labels or text annotations above specific nodes. I've successfully added child nodes to my AnchorNode, but I'm unable to find a straightforward way to attach labels to these nodes.
fun addChildNodeToAnchor(parentNode: Node, position: Position) { Node(binding.arSceneView.engine).apply { isEditable = false name = "child node" lifecycleScope.launch { withContext(Dispatchers.Main) { val modelNode = buildModelNode("child", position, "myModel.glb", 0.25f) modelNode?.let { addChildNode(it) it.position = Position(x = position[0], y = position[1], z = position[2]) } parent = parentNode } } } }
I need to display labels or text annotations above specific nodes. I've successfully added child nodes to my AnchorNode, but I'm unable to find a straightforward way to attach labels to these nodes.
fun addChildNodeToAnchor(parentNode: Node, position: Position) { Node(binding.arSceneView.engine).apply { isEditable = false name = "child node" lifecycleScope.launch { withContext(Dispatchers.Main) { val modelNode = buildModelNode("child", position, "myModel.glb", 0.25f) modelNode?.let { addChildNode(it) it.position = Position(x = position[0], y = position[1], z = position[2]) } parent = parentNode } } } }
`