Playing Multiple Animation Groups at Once

I have a asset in .glb format with multiple animations. I can access these animations through the animationGroups callback perimeter when I load in my asset.

BABYLON.SceneLoader.ImportMesh(null, "assets/", "player.glb", scene,
     function(meshes, particleSystems, skeletons, animationGroups) {
         const idleAnim = animationGroups[0];
         const walkAnim = animationGroups[1];
 
         idleAnim.stop();
         walkAnim.play();
 
     }
 );

Is it possible to play multiple animation groups at once, similar to combining animatables or using weights in controlling animatables? I think that calling .play() overwrites any currently playing animation groups.

The reason Iā€™m asking this is that it would significantly reduce the amount of work I have to do in creating independent animations. I could have each group be responsible for certain areas of my figure (etc lower body bones versus upper body bones) and be able to mix and match animation statuses (etc firing or aiming combined with walking or running).

1 Like

Hey! This should already work actually:)

Can you share a repro in the playground?

1 Like