Problematically rotate 3D model using Sceneform ecosystem

Not sure if this is what you looking for but try this it looks to me nightmare though it works i have tried it somewhere at the bottom page he will explain to you how to rotate the 3dobject look for this title "Bonus: Make the heart rotate!"

how to do rotatation animation in sceneform


I have used setLocalRotation to successfully rotate object for 90 degrees programatically.

      // 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 node = new TransformableNode(arFragment.getTransformationSystem());

      //set rotation in direction (x,y,z) in degrees 90
      node.setLocalRotation(Quaternion.axisAngle(new Vector3(1f, 0, 0), 90f));

      node.setParent(anchorNode);
      node.setRenderable(renderable);
      node.select();

If you would be interested in more info about Quaternion I recommend: https://proandroiddev.com/arcore-cupcakes-4-understanding-quaternion-rotations-f90703f3966e.

But basically last parameter is angle in degrees. In this case 90deg -> 90f. By vector you specify direction of the rotation. In example I have rotated in x direction (x,y,z) -> (1f, 0, 0). Hope it helps.