放置它们后,我需要从场景中删除所有节点,我添加了此代码以在场景中放置transformableNodes
val anchorNode = AnchorNode(anchor)
val transformableNode = TransformableNode(arFragment.transformationSystem)
transformableNode.setParent(anchorNode)
transformableNode.renderable = viewRenderable
arFragment.arSceneView.scene.addChild(anchorNode)
transformableNode.select()
放置AnchorNodes之后,我要从场景中删除所有transformableNodes
答案 0 :(得分:0)
经过多次尝试,我找到了答案
for (node in nodesList){
node.isEnabled = false
arFragment.arSceneView.scene.removeChild(node)
}