Sceneform SDK объект не двигаться на стене - PullRequest
0 голосов
/ 01 июня 2018

Я использую пример SceneForm SDK, но в этом случае, когда мы помещаем объект на обнаруженный пол, мы можем двигаться не на стене.Как это можно решить?

arFragment.setOnTapArPlaneListener(
                (HitResult hitResult, Plane plane, MotionEvent motionEvent) -> {
                    if (andyRenderable == null) {
                        return;
                    }

                   /* if (plane.getType() != Type.HORIZONTAL_UPWARD_FACING) {
                        return;
                    }*/

                    // Create the Anchor.
                    Anchor anchor = hitResult.createAnchor();
                    AnchorNode anchorNode = new AnchorNode(anchor);
                    anchorNode.setParent(arFragment.getArSceneView().getScene());

                    // Create the transformable andy and add it to the anchor.
                    TransformableNode andy = new TransformableNode(arFragment.getTransformationSystem());
                    andy.setParent(anchorNode);
                    andy.setRenderable(andyRenderable);
                    andy.select();
                    andy.setEnabled(true);
                });

1 Ответ

0 голосов
/ 19 июля 2018

в новой версии SCENEFORM SDK, проблема v1.3.0 решена.используйте это в уровне приложения gradle

реализация "com.google.ar.sceneform: core: 1.3.0"

и используйте это для уровня проекта gradle

classpath 'com.google.ar.sceneform: плагин: 1.3.0'

...