Page Summary
-
BaseArFragment.OnTapArPlaneListeneris 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 theHitResult, the tappedPlane, and the rawMotionEvent. -
Developers can use this listener to implement custom actions when a plane is tapped in their AR experience, such as placing virtual objects.
Invoked when an ARCore plane is tapped.
Public Methods
| abstract void |
onTapPlane(HitResult hitResult, Plane plane, MotionEvent motionEvent)
Called 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 |