TransformableNode onTapListener not being called on .glb node #256
-
Hello again. I'm unable to recognize touch on the node (.glb). I have tried with:
In the video, I'm using Your example called [sample-ar-model-viewer]. Touch only works on viewRenderable, but not on .glb 3d model. I also tried to remove peek peekTouchListener after placing the object but nothing helped. Thank you for any tips. video_2021-12-17_15-17-19.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
First attempt (Toast is called only on viewRenderable tap (text/2d graphics above the character)):
|
Beta Was this translation helpful? Give feedback.
-
Second attempt (hitTestResult.node is always null):
|
Beta Was this translation helpful? Give feedback.
-
Hi, That's because the touch event is dispatch to the ViewRenderable which could have some standard Android View clicks to handle (Button, TextView,...) Can you please move to https://github.com/SceneView/sceneview-android in order for me not to go back inside the old Sceneform touch system code to answer your question? We don't have yet completely renew it but setting the |
Beta Was this translation helpful? Give feedback.
Hi,
That's because the touch event is dispatch to the ViewRenderable which could have some standard Android View clicks to handle (Button, TextView,...)
Can you please move to https://github.com/SceneView/sceneview-android in order for me not to go back inside the old Sceneform touch system code to answer your question?
We don't have yet completely renew it but setting the
https://github.com/SceneView/sceneview-android/blob/cbb9f9f6345f40b4bda18fcfa47c79fa059aba0c/sceneview/src/main/kotlin/io/github/sceneview/SceneView.kt#L407
will override any possible View touch returning true.