Node.OnTapListener
Stay organized with collections
Save and categorize content based on your preferences.
AI-generated Key Takeaways
Node.OnTapListener is an interface used to handle tap interactions on Sceneform nodes.
It provides a single method, onTap(), which is triggered when a node is tapped.
onTap() receives a HitTestResult object containing information about the tap location and the tapped node, along with the corresponding MotionEvent.
BaseTransformableNode and TransformableNode are known indirect subclasses that implement this interface, enabling tap interactions for transformable nodes in AR scenes.
[null,null,["Last updated 2024-06-26 UTC."],[],["`Node.OnTapListener` is an interface for handling node taps. It defines the `onTap` method, which is invoked when a node is tapped. The `onTap` method receives a `HitTestResult` containing tap information and a `MotionEvent` representing the `ACTION_UP` event. `BaseTransformableNode` and `TransformableNode` are subclasses that can be transformed with gestures. `onTap` method handles the action of being tapped and gets information of the node through `getNode()`.\n"]]