Answer the question
In order to leave comments, you need to log in
How to properly play animation in sceneform (ArCore)?
I am creating an AR application using https://github.com/ThomasGorisse/sceneform-android-sdk and using this code I add a model to the scene:
ModelRenderable.builder()
.setSource(this, R.raw.olaf)
.setIsFilamentGltf(true)
.build()
.thenAccept(modelRenderable ->
{
mainAnchorNode = new AnchorNode(startAnchor);
arFragment.getArSceneView().getScene().addChild(mainAnchorNode);
TransformableNode transformableNode = new TransformableNode(arFragment.getTransformationSystem());
transformableNode.setLocalRotation(Quaternion.axisAngle(new Vector3(0, 1f, 0), 180f));
transformableNode.setParent(mainAnchorNode);
transformableNode.setRenderable(modelRenderable);
}
private ObjectAnimator animator;
animator = ModelAnimator.ofAnimation(transformableNode.getRenderableInstance(), animationType);
animator.start();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question