I’m trying to animate multiple Ready Player Me avatars at the same time with different animations, but I’m having issues trying to allocate animations to avatars.
I’ve created a very simple demo where:
- I’m downloading a first RPM avatar.
- I’m downloading a second RPM avatar.
- I’m downloading 3 animations (“BreathingIdle”, “Running”, “Walking”).
These 3 animations seems to be automatically attached to the first RPM avatar downloaded (importedRPM), so I just start the first animation (scene.getAnimationGroupByName(“BreathingIdle”)) on that avatar:
BABYLON.SceneLoader.ImportMeshAsync("", "https://api.readyplayer.me/v1/avatars/", "63354b2d7ca7d77c3a5febc1.glb", scene).then((importedRPM) => {
BABYLON.SceneLoader.ImportMeshAsync("", "https://api.readyplayer.me/v1/avatars/", "621dfdd170f4fcd078c26671.glb", scene).then((importedRPM2) => {
BABYLON.SceneLoader.ImportAnimationsAsync("https://talk-q.com/", "animations.glb", scene, true, BABYLON.SceneLoaderAnimationGroupLoadingMode.Clean, null).then((importedAnimations) => {
const anim = scene.getAnimationGroupByName("BreathingIdle");
anim.start(true, 1, anim.from, anim.to, false);
});
});
});
However, I’m not able to allocate this same animation to the second avatar (importedRPM2).
Checking on Babylonjs documentation and on several posts in this forum, hasn’t really helped so far. I’ve tried many different techniques, but none seem to work.
I’d be grateful if anyone could help me here.
Thank you!