From fac4c1e44bab8c44f56a277eb1e9d57c3db8c58b Mon Sep 17 00:00:00 2001 From: Thomas Gorisse Date: Wed, 19 Jun 2024 19:05:36 +0200 Subject: [PATCH] Play all `ModelNode` animations when `autoAnimate = true` --- sceneview/src/main/java/io/github/sceneview/node/ModelNode.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sceneview/src/main/java/io/github/sceneview/node/ModelNode.kt b/sceneview/src/main/java/io/github/sceneview/node/ModelNode.kt index 1710d9f6..5b6e7aca 100644 --- a/sceneview/src/main/java/io/github/sceneview/node/ModelNode.kt +++ b/sceneview/src/main/java/io/github/sceneview/node/ModelNode.kt @@ -204,7 +204,7 @@ open class ModelNode( } } if (autoAnimate && animator.animationCount > 0) { - playAnimation(0) + for (i in 0 until animator.animationCount) { playAnimation(i) } } scaleToUnits?.let { scaleToUnitCube(it) } centerOrigin?.let { centerOrigin(it) }