Is it possible to animate multiple same avatars by a single animation

When we instanciate a avatar, we can use asset container like this.
the animation groups and skeletons are also cloned. Is it possible not to duplicate the animation but play the same animation group on cloned avatars and control them independently?

I do not think so as they are not in sync and if you had only one all the values should be the same so the three anim would be in sync.

Thank you for your reply. I am little bit confused about the implementation of this part. In this case, for a single renderloop, do we really need the whole sequence of keyframes for every avatar and store them serveral times? What if we reference animation group as a templete and control the animation play? Looking forward to your advice. :slight_smile:

The only think we could potentially shared are the animation data themselves as animation are containing their target which is not the case at the moment.

@Deltakosh do you think it is worth it memory wise ? that cloning animation would retain a shared key array ?

it could help on memory for sure and I see no problem starting multiple targetedAnimation from a single animation (it is actually designed to work this way).

1 Like

@RavenLee I ll try to see how I could sort this, but you would still have the separate animation groups :slight_smile: this would only be an internal saving.


@Deltakosh @sebavan Thank you very much for help. have a good day :wink:

1 Like

This will be in soon Anim group clone does not always require an animation clone. by sebavan · Pull Request #11253 · BabylonJS/Babylon.js · GitHub

@sebavan Wow it is cool!! I wonder if this feature will appear on the next update. :crazy_face:

yup it will and should be in already :slight_smile: