How to prevent animations from auto-starting by SceneLoader

Why do animated GLBs auto-start their animations (loading via SceneLoader.LoadAssetContainer), and how can I prevent this? I see the Animations in the container, but no Animatables that I can use to stop the animations started by the loader.

You can configure the GLTF loader to NOT start animation:

BABYLON.SceneLoader.OnPluginActivatedObservable.add(function (loader) {
        if (loader.name === "gltf") {
            loader.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.NONE;
        }
    });
2 Likes

Got it, thank you!

And for those like myself working in Typescript:

( loader as GLTFFileLoader ).animationStartMode = GLTFLoaderAnimationStartMode.NONE;

4 Likes