Hi! I have two character meshes, both with identical skeletons. I’m wanting to import another .glb file containing animations for these characters, and then “assign” these animations to each character. This is what I’ve gotten so far:
//Import first character
BABYLON.SceneLoader.Append("", base64Uri, scene, (result) => {});
//Import second character
BABYLON.SceneLoader.Append("", base64Uri2, scene, (result) => {});
//Import animation(s)
BABYLON.SceneLoader.ImportAnimations(
"folder/",
"animations.glb",
scene,
(result) => {}
);
All this does is play one of the animations for one character. How do I play the animation(s) for both characters, or assign an animation to character one, and another animation to character two? Basically, I just need to know how to manipulate my animation.glb once it’s been imported into the scene. Any advice is welcome!
The result is, as you’ll see, that parts of the character mesh simply just get displaced. I’m still very new to animation in Babylonjs, so I apologize of I’m missing something obvious. Thanks in advance.
Also I would exchange setTimeout with scene.onReadyObservable:
What I would check aswell is if using stop() on animationGroup can be enabled by play() or rather start()-function. From what I remember start() is opposite of stop() and play() is opposite of pause().