# Merging GLB meshes & attaching skeleton mangles animations

**URL:** <https://forum.babylonjs.com/t/merging-glb-meshes-attaching-skeleton-mangles-animations/45784>\
**Category:** Questions\
**Created:** [November 19, 2023, 12:09pm UTC](https://forum.babylonjs.com/t/merging-glb-meshes-attaching-skeleton-mangles-animations/45784 "2023-11-19T12:09:32Z")\
**Posts on this page:** 1\
**Showing post:** 11

<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:** [December 2, 2023, 10:59am UTC](https://forum.babylonjs.com/t/merging-glb-meshes-attaching-skeleton-mangles-animations/45784/11 "2023-12-02T10:59:59Z")

</div>

Sorry, I did not see it was the same animation.

You will have to bake all the different animations in the same VAT texture. You can have a look here to see how it can be done:

> [@Baked Texture Animations with Animation Groups?](https://forum.babylonjs.com/t/baked-texture-animations-with-animation-groups/32518/30):
>
> The main problem is that the hierarchy of the skeleton is not the same for your character than for the character in the other PG. It seems you should use index #38 to properly attach the sword to the hand. Also: the order of the anims in PICKED\_ANIMS should be given in the order they appear in the scene.animationGroups array I changed how to compute the value passed to goToFrame (line 161), I’m not sure how the previous code could properly loop…

Look at the `bakeVertexData` function.

---

_[View the full topic](https://forum.babylonjs.com/t/merging-glb-meshes-attaching-skeleton-mangles-animations/45784)._
