- Sceneform SDK for Android was open sourced and archived (github.com/google-ar/sceneform-android-sdk) with version 1.16.0.
- This site (developers.google.com/sceneform) serves as the documentation archive for the previous version, Sceneform SDK for Android 1.15.0.
- Do not use version 1.17.0 of the Sceneform Maven artifacts.
- The 1.17.1 Maven artifacts can be used. Other than the version, however, the 1.17.1 artifacts are identical to the 1.15.0 artifacts.
BaseArFragment.OnTapArPlaneListener
Invoked when an ARCore plane is tapped.
Public Methods
public
abstract
void
onTapPlane
(HitResult hitResult, Plane plane, MotionEvent motionEvent)
Called when an ARCore plane is tapped. The callback will only be invoked if no Node
was tapped.
Parameters
hitResult |
The ARCore hit result that occurred when tapping the plane |
plane |
The ARCore Plane that was tapped |
motionEvent |
the motion event that triggered the tap
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 UTC.
[null,null,["Last updated 2024-06-26 UTC."],[[["`BaseArFragment.OnTapArPlaneListener` is an interface triggered when a user taps a detected plane in an AR scene."],["It provides a single method, `onTapPlane()`, which is called if no Sceneform Node was tapped at the location."],["`onTapPlane()` delivers information about the tap event, including the `HitResult`, the tapped `Plane`, and the raw `MotionEvent`."],["Developers can use this listener to implement custom actions when a plane is tapped in their AR experience, such as placing virtual objects."]]],["The `BaseArFragment.OnTapArPlaneListener` interface is invoked when an ARCore plane is tapped, providing a callback method `onTapPlane`. This method receives three parameters: `HitResult`, detailing the tap location; `Plane`, specifying the tapped ARCore plane; and `MotionEvent`, indicating the tap event. This callback occurs only when no `Node` is tapped. `setOnTapArPlaneListener` method is used to manage this listener.\n"]]