我试图显示一个对象,而不使用ARCore点击屏幕.在Google提供的ARCore Sceneform的基本示例中,您需要在检测到曲面后点击屏幕.
我想实现它,AR显示对象而不点击屏幕.
Anchor newAnchor;
for (Plane plane : mSession.getAllTrackables(Plane.class)) {
if (plane.getType() == Plane.Type.HORIZONTAL_UPWARD_FACING
&& plane.getTrackingState() == TrackingState.TRACKING)
{
newAnchor = plane.createAnchor(plane.getCenterPose());
break;
}
}
Run Code Online (Sandbox Code Playgroud)
我试过这个没有点击屏幕显示.
如果有人知道怎么做,请帮助我.提前致谢