# AssetContainer animation group clone broken in Babylonv5

**URL:** <https://forum.babylonjs.com/t/assetcontainer-animation-group-clone-broken-in-babylonv5/25495>\
**Category:** Questions\
**Created:** [November 23, 2021, 7:27am UTC](https://forum.babylonjs.com/t/assetcontainer-animation-group-clone-broken-in-babylonv5/25495 "2021-11-23T07:27:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bozworth](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bozworth/32/6484_2.png) [@bozworth](https://forum.babylonjs.com/u/bozworth)\
**Post date:** [November 23, 2021, 7:27am UTC](https://forum.babylonjs.com/t/assetcontainer-animation-group-clone-broken-in-babylonv5/25495/1 "2021-11-23T07:27:30Z")

</div>

[https://playground.babylonjs.com/#IJ5DL6#28](https://playground.babylonjs.com/#IJ5DL6#28)

Here i load a tpose model through asset container and then instantiate it, and then try to load and clone the animation groups from another asset container.

This used to work in 4.2 but now is broken.

Switch between 4.2 and 5 to see

Any recommendations for fix?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [November 23, 2021, 10:16am UTC](https://forum.babylonjs.com/t/assetcontainer-animation-group-clone-broken-in-babylonv5/25495/2 "2021-11-23T10:16:28Z")

</div>

@Evgeni_Popov might have a brillant idea ?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [November 24, 2021, 12:05pm UTC](https://forum.babylonjs.com/t/assetcontainer-animation-group-clone-broken-in-babylonv5/25495/3 "2021-11-24T12:05:33Z")

</div>

I don’t quite know why it works in 4.2 because an animation loaded from a gltf/glb file must update the transform nodes, not the bones. So you should modify `return avatar.skeletons[0].bones[idx];` to `return avatar.skeletons[0].bones[idx].getTransformNode();`:

[https://playground.babylonjs.com/#IJ5DL6#30](https://playground.babylonjs.com/#IJ5DL6#30)

---

<div class="post-metadata">

**Author:** ![bozworth](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bozworth/32/6484_2.png) [@bozworth](https://forum.babylonjs.com/u/bozworth)\
**Post date:** [November 24, 2021, 1:28pm UTC](https://forum.babylonjs.com/t/assetcontainer-animation-group-clone-broken-in-babylonv5/25495/4 "2021-11-24T13:28:56Z")

</div>

Amazing thank you! I don’t know why it worked before either, i thought the bones were transformnodes already? but looks like you need to get the node.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [November 24, 2021, 2:40pm UTC](https://forum.babylonjs.com/t/assetcontainer-animation-group-clone-broken-in-babylonv5/25495/5 "2021-11-24T14:40:37Z")

</div>

No, bones are not transform nodes (they inherit from `Node`, not `TransformNode`).

When loading a gltf/glb file, each bone of a skeleton is linked to a `TransformNode` (`bone.getTransformNode()` returns a non-null value) and it is this `TransformNode` which is animated, not the bone (but the bone still gets updated by the `TransformNode` matrix to mirror the transformation).

---

<div class="post-metadata">

**Author:** ![bozworth](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bozworth/32/6484_2.png) [@bozworth](https://forum.babylonjs.com/u/bozworth)\
**Post date:** [November 24, 2021, 3:45pm UTC](https://forum.babylonjs.com/t/assetcontainer-animation-group-clone-broken-in-babylonv5/25495/6 "2021-11-24T15:45:02Z")

</div>

phenomenal cheers
