Answers for "create anchor arcore"

0

create anchor arcore

if (this.anchorNode == null) {

    Session session = arFragment.getArSceneView().getSession();

    float[] position = { 0, 0, -0.75 };       // 75 cm away from camera
    float[] rotation = { 0, 0, 0, 1 };

    Anchor anchor =  session.createAnchor(new Pose(position, rotation));

    anchorNode = new AnchorNode(anchor);
    anchorNode.setRenderable(yourModelRenderable);
    anchorNode.setParent(arFragment.getArSceneView().getScene());
}
Posted by: Guest on July-15-2020

Browse Popular Code Answers by Language