相关疑难解决方法(0)

如何在不点击屏幕的情况下放置对象

我试图显示一个对象,而不使用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)

我试过这个没有点击屏幕显示.

如果有人知道怎么做,请帮助我.提前致谢

android arcore

9
推荐指数
1
解决办法
3368
查看次数

标签 统计

android ×1

arcore ×1