meshTask + clone + animationGroups

I’m trying to figure out how to clone a mesh and the animationGroup for use in duplicate meshes throughout the world while using addMeshTask from the assetManager.

Here’s a PG:

I can’t figure out how to clone the animationGroup properly for use in the second (cloned) mesh.


I’m not sure how this can be done using AnimationGroup, which is why I switched to using Skeletons and AnimationRanges imported from .babylon files, as shown in the demo: Dancers Performance demo. You can view the source code inside the .html file in the tag.

add method “addContainerTask” for BABYLON.AssetsManager (lines: 1 - 57)
use method “addContainerTask” (line: 83)

managing loaded object (lines: 107 - 114)

read this documentation:

1 Like

Thank you, @gbz and @Shaft_Dg, for these elegant demos and solutions!

1 Like

To follow up, I was able to successfully implement the solution provided by @Shaft_Dg to solve the issue. Thanks again!