After adding groups to the animation model, the model animation becomes invalid

After adding groups to the animation model, the model animation becomes invalid
https://playground.babylonjs.com/#XUUH86
I need to group the model and how to solve the problem of model animation execution

This happens because the group has changed the mesh’s hierarchy, making the references in the animation group invalid. You would have to retarget the animation for the updated hierarchy. @PatrickRyan pinging you to check, would this be a common operation to do with animation groups? I’m wondering if it would be worth to add a helper function to do this?

I don’t think it’s a problem of retargeting in this case.

Here, it is Sphere001 which is animated. In the first case, the cones are also animated because they are children of Sphere001:

image

When the group is created, the cones are no longer children of Sphere001, so they are not animated:

image

The relationship between the cones and Sphere001 should be retained even when the group is created.

1 Like