Break the auto loop when importing animated GLB file

I append an animated GLB file into my scene. It works perfectly : all the animations are running well, but I would like to read it only one time. I would like to remove the auto loop reading,
I wrote:

BABYLON.SceneLoader.Append(“img/Blender2/”, “Elevate3.glb”, scene, function (newMeshes) {
…some stuff…
});
How could I remove the auto loop ? How could i call the function if any?
Thank you very much!

Hello and welcome!

You have a few options:

  • You can call scene.stopAllAnimations() and manually start the animation group you want (with no loop)
  • Set the gltf plugin.animationStartMode to none and control the animations the way you want: https://www.babylonjs-playground.com/#3D23K4#4

Wow! Your answer was so quick! Thank you! I’ll trye it soon and tell you…I’m actually a fresh user of babylon, it’s so great!

Could you also help me for something else? I would like to get back an imporated mesh to animated it with other meshes, but I don’t know how to put an external animate function (outside de block “BABYLON.SceneLoader.ImportMesh{…” ), I would like to animate many letters of a logo separately and then oll the logo in block…

Tricky question?

Thank you so much!

This will probably require another topic just to make it clear for everyone interested in the question (and the answer)

Please add a link to a playground as well so we can directly help you with code :wink:

I don’t know how to do that…Sorry

Just go to playground.babylonjs.com and recreate your issue :wink: