# Wrong orientation when play animation

**URL:** <https://discourse.threejs.org/t/wrong-orientation-when-play-animation/3182>\
**Category:** Questions\
**Tags:** fbx-loader, animation\
**Created:** [June 20, 2018, 2:05pm UTC](https://discourse.threejs.org/t/wrong-orientation-when-play-animation/3182 "2018-06-20T14:05:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liu\_Hao](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Liu\_Hao](https://discourse.threejs.org/u/Liu_Hao)\
**Post date:** [June 20, 2018, 2:05pm UTC](https://discourse.threejs.org/t/wrong-orientation-when-play-animation/3182/1 "2018-06-20T14:05:04Z")

</div>

I use fbx-loader to load my fbx file, which has an bone animation, when the file init loaded in scene, it looks good, but when I play the animation use `action.reset(); action.play()` , the animation’s orientation is changed to a wrong direction, when the animation finished, the orientation becomes normal.  
I have inspected , It played well in 3DX MAX.  
So any advice you smart guys can give me ?  
some tips for me to locate the issue point?

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [June 20, 2018, 4:00pm UTC](https://discourse.threejs.org/t/wrong-orientation-when-play-animation/3182/2 "2018-06-20T16:00:56Z")

</div>

Can you share the model, and a complete code sample that illustrates the problem?

---

<div class="post-metadata">

**Author:** ![Liu\_Hao](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Liu\_Hao](https://discourse.threejs.org/u/Liu_Hao)\
**Post date:** [June 21, 2018, 1:36am UTC](https://discourse.threejs.org/t/wrong-orientation-when-play-animation/3182/3 "2018-06-21T01:36:38Z")

</div>

```
updateAnimation(dt) {
    if (this.mixers.length > 0) {

        for (var i = 0; i < this.mixers.length; i++) {

            this.mixers[i].update(dt);
        }
    }
}

clipAnimation(bLoopRepeat) {
    this.meshObj.mixer = new THREE.AnimationMixer(this.meshObj);
    this.mixers.push(this.meshObj.mixer);

    for(var i=0; i< this.meshObj.children.length; ++i) {
        if(this.meshObj.children[i] instanceof THREE.SkinnedMesh) {
            this.meshObj.children[i].material.skinning = true;
        }
    }

    this.action = this.meshObj.mixer.clipAction(this.meshObj.animations[0]);
    var loop = bLoopRepeat ? THREE.LoopRepeat : THREE.LoopOnce;
    this.action.setLoop(loop);
    this.action.reset();
}

stopAnimation() {
    this.action.stop();
}

playAnimation() {
    this.action.reset();
    this.action.play();
}

pauseAnimation() {
    this.action.paused = true;
}

```

This the code I used to play animation, I could share the fbx file for some reason. I also tried use the same fbx file in babylon.js, it works fine.

---

<div class="post-metadata">

**Author:** ![Liu\_Hao](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Liu\_Hao](https://discourse.threejs.org/u/Liu_Hao)\
**Post date:** [June 21, 2018, 2:06pm UTC](https://discourse.threejs.org/t/wrong-orientation-when-play-animation/3182/4 "2018-06-21T14:06:39Z")

</div>

Find the problem.  
“The root bone do not need animation”, this is my colleague’s suggest.  
PS. I don’t know why unity, 3ds max and babylon they all handle this saturation well, maybe this is a corner case which fbxloader doesn’t handle well. @looeee

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [June 21, 2018, 5:23pm UTC](https://discourse.threejs.org/t/wrong-orientation-when-play-animation/3182/5 "2018-06-21T17:23:01Z")

</div>

@Liu_Hao I really couldn’t say without taking a look at the FBX file.
