How to use the animations that are included in a glTF model via code ? [Confused by file structure]

I have this file that features a frog with an idle,attack and move animation

You can see it in the babylon sandbox here :

The thing that confuses me is the file structure/skeleton/frog armature thing and how I’m supposed to use it in code to begin the animation I want using scene.beginAnimation() ?

I use the editor to place my objects in the scene and then export the scene.babylon file which I import via code.

In the editor the jump animation of the frog plays constantly but when I export the scene it seems like the animations don’t carryover. Any ideas ?

Using the assetmanager to import the glb file in the scene works great and imports the animations too though…does that mean that the editor doesn’t have the ability to export animations too or is it a bug ?

Unfortunately our gltf exporter does not export animations yet :frowning:

1 Like

Well I tried something quick using blender and if I export the blender created scene in glb the animations play fine !

Do you think it’s bad to use blender as a glorified level editor/designer, also is it bad to export to glb instead of the babylon format for this purpose ? Cause I used the babylon editor as of now but I had some problems here and there.

Nope blender is a great tool and gltf is our favorite format when it comes to open standards :slight_smile:

1 Like