# How to move the bones of the GLB 3D model?

**URL:** <https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506>\
**Category:** Questions\
**Created:** [July 14, 2019, 8:48pm UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506 "2019-07-14T20:48:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimaz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dimaz/32/3370_2.png) [@Dimaz](https://forum.babylonjs.com/u/Dimaz)\
**Post date:** [July 14, 2019, 8:48pm UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506/1 "2019-07-14T20:48:50Z")

</div>

Hello everyone.

On the website of the game engine there is a demo of the use bones of the game character:  
[https://www.babylonjs-playground.com/#1BZJVJ#33](https://www.babylonjs-playground.com/#1BZJVJ#33)

My problem is this: When I load another model with bones, nothing happens.  
I thought this was due to the fact that the downloadable 3d model has the .glb format, while in the demo the model has the .babylon format.  
I decided to check if the engine sees the bones of the GLB 3d model.

```
console.log(skeleton.bones[1]);

```

Yes, the engine sees the bones of the model in the format glb. But for some reason he does not want to rotate them, move them and so on.  
You can find a link to the GLB 3D model in this demo:  
[https://playground.babylonjs.com/#ZQPDEF#7](https://playground.babylonjs.com/#ZQPDEF#7)

To scale an airplane 3D model when loading into the first demo, change the parameters:

```
mesh.scaling = new BABYLON.Vector3(20.1,20.1,20.1);
```

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 15, 2019, 5:11pm UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506/2 "2019-07-15T17:11:49Z")

</div>

Hey! and welcome to the family 🙂

This is because your glb has animations for the bones so the animations are overwriting your changes

---

<div class="post-metadata">

**Author:** ![Dimaz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dimaz/32/3370_2.png) [@Dimaz](https://forum.babylonjs.com/u/Dimaz)\
**Post date:** [July 15, 2019, 8:57pm UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506/3 "2019-07-15T20:57:03Z")

</div>

I turned off the animation using this code:

```
scene.animationsEnabled = false;

```

It did not work. The bones don’t move anyway.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 15, 2019, 9:00pm UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506/4 "2019-07-15T21:00:35Z")

</div>

Let me check that 🙂

---

<div class="post-metadata">

**Author:** ![Dimaz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dimaz/32/3370_2.png) [@Dimaz](https://forum.babylonjs.com/u/Dimaz)\
**Post date:** [July 15, 2019, 9:16pm UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506/5 "2019-07-15T21:16:22Z")

</div>

[https://www.babylonjs-playground.com/#1BZJVJ#126](https://www.babylonjs-playground.com/#1BZJVJ#126)

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 15, 2019, 9:34pm UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506/6 "2019-07-15T21:34:18Z")

</div>

OK I know why 🙂  
GLTF works the same way UNity works with Bones: the bones are linked to nodes and reproduce the nodes transform

In your example, instead of moving the bones, you need to move the root meshes:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/1/1cdf94f2afc5ce12473faf729477634fb81d4b0a.png)

---

<div class="post-metadata">

**Author:** ![Dimaz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dimaz/32/3370_2.png) [@Dimaz](https://forum.babylonjs.com/u/Dimaz)\
**Post date:** [July 16, 2019, 11:24am UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506/7 "2019-07-16T11:24:29Z")

</div>

Thank you. I found a propeller 😄

```
var propellor = scene.rootNodes[2]._children[0]._children[1]._children[0]._children[0]._children[3];
propellor.rotate(BABYLON.Axis.Z, .01, BABYLON.Space.WORLD, mesh);

```

Is there any other way to find it?

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 16, 2019, 2:21pm UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506/8 "2019-07-16T14:21:09Z")

</div>

You can also find it by name with scene.getMeshByName("…")

---

<div class="post-metadata">

**Author:** ![Dimaz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dimaz/32/3370_2.png) [@Dimaz](https://forum.babylonjs.com/u/Dimaz)\
**Post date:** [July 16, 2019, 8:38pm UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506/9 "2019-07-16T20:38:21Z")

</div>

```
scene.getMeshByName("Propellor_Joint.9");

```

This code returns ‘null’.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 16, 2019, 8:45pm UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506/10 "2019-07-16T20:45:51Z")

</div>

Try:

```auto
   scene.getTransformNodeByName("Propellor_Joint.9")

```

They are not meshes but only TransformNodes

---

<div class="post-metadata">

**Author:** ![Dimaz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dimaz/32/3370_2.png) [@Dimaz](https://forum.babylonjs.com/u/Dimaz)\
**Post date:** [July 16, 2019, 8:53pm UTC](https://forum.babylonjs.com/t/how-to-move-the-bones-of-the-glb-3d-model/4506/11 "2019-07-16T20:53:22Z")

</div>

Thank! It worked.
