Closed iamcomgong closed 1 month ago
Likely, you will need to configure the onSingleTap property along with another property called isTouchable, understanding that the onSingleTap property should be assigned to a function, which in your case would be to display the Toast.
But it's also possible that what you need to touch is the model and not the anchor, which would leave you with something like this
val modelNode = ModelNode(modelInstance = it).apply { playAnimation(0) isTouchable = true onSingleTapConfirmed = ::showToast() }
hello! I'm using AR SceneView 2.0.2. I'm currently using several geo-anchors in a project, and I want when I click on each anchor, a Toast message containing the anchor's information will appear. I think I can use onSingleTab, but can you tell me the code?
` private fun addAnchorNode(anchor: Anchor) { Log.d("CameraFragmentAR", "addAnchorNode added") val anchorNode = AnchorNode(binding.sceneView.engine, anchor)
`