In our projects, we have a workflow where the 3D Artist generates GLTF/GLB files with two different contents:
animation files of such meshes.
Until now, we’re being using BABYLON.SceneLoader.ImportMeshAsync to load those animations-only assets, but we are certainly a little picky and think maybe BABYLON.SceneLoader.ImporAnimationsAsync is a more semantic and proper way to make the job.
This said, We are able of course to load properly the animations with ImporAnimationsAsync, but once the different animation groups are created under the scene, animationGroups[i].targetedAnimations[j].target is always null, when formerly (I mean using ImportMeshAsync) we had always a valid value there. With target being null for all the targetedAnimations it’s not possible to assign the animations to the geometry nodes in the scene.
Are the node names from the animations already loaded? If not, this is expected as you are only loading the animations and not the node they point to. The default behavior is to find the node by name in the scene, but if there are not there, they will be null.
targetConverter defines a function used to convert animation targets from loaded scene to current scene (default: search node by name)