# Transform Node and Animations not start good animation

**URL:** <https://forum.babylonjs.com/t/transform-node-and-animations-not-start-good-animation/11010>\
**Category:** Bugs\
**Created:** [May 20, 2020, 3:56pm UTC](https://forum.babylonjs.com/t/transform-node-and-animations-not-start-good-animation/11010 "2020-05-20T15:56:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![VSerain](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vserain/32/8563_2.png) [@VSerain](https://forum.babylonjs.com/u/VSerain)\
**Post date:** [May 20, 2020, 3:56pm UTC](https://forum.babylonjs.com/t/transform-node-and-animations-not-start-good-animation/11010/1 "2020-05-20T15:56:35Z")

</div>

Hi ! I’m new here !  
I work on the little game, and I imported meshes with LoadAssetContainer!  
I spawn meshes with instantiateModelsToScene !  
And i want play an animation to rootNode[0] (is TransformeNode), but i added two animation, the first at frame 0 to 2 and the second at frame 10 to 12 !  
And later i start the first animation with `scene.beginAnimation(node, 0, 2, true, 1);` but at first time there are the second animation is start !

PlaygroundLink : [https://www.babylonjs-playground.com/#JJHYZI#7](https://www.babylonjs-playground.com/#JJHYZI#7)

Sorry for my english i’m french and this is my first com in an english forum

Victor

---

<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:** [May 20, 2020, 4:35pm UTC](https://forum.babylonjs.com/t/transform-node-and-animations-not-start-good-animation/11010/2 "2020-05-20T16:35:24Z")

</div>

No problem, I’m french as well 🙂

here is your fix: [https://www.babylonjs-playground.com/#JJHYZI#9](https://www.babylonjs-playground.com/#JJHYZI#9)

---

<div class="post-metadata">

**Author:** ![VSerain](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vserain/32/8563_2.png) [@VSerain](https://forum.babylonjs.com/u/VSerain)\
**Post date:** [May 20, 2020, 5:15pm UTC](https://forum.babylonjs.com/t/transform-node-and-animations-not-start-good-animation/11010/3 "2020-05-20T17:15:37Z")

</div>

Hey, thanks for the fix,  
But i want understand, why scene.beginAnimation start all animations ?  
I belive the parameters « from » is conresponding a the start animation frame and the parameters « to » is the end animation frame !  
So if i set « from » at 0 and « to » at 2, why the animation with frame is more than 10 is started ?

Thanks for your Time !

---

<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:** [May 20, 2020, 5:42pm UTC](https://forum.babylonjs.com/t/transform-node-and-animations-not-start-good-animation/11010/4 "2020-05-20T17:42:26Z")

</div>

the beginAnimation will start all animation. The key for animation2 will be out of scope and thus will be in repeat mode

---

<div class="post-metadata">

**Author:** ![VSerain](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vserain/32/8563_2.png) [@VSerain](https://forum.babylonjs.com/u/VSerain)\
**Post date:** [May 20, 2020, 6:05pm UTC](https://forum.babylonjs.com/t/transform-node-and-animations-not-start-good-animation/11010/5 "2020-05-20T18:05:57Z")

</div>

ok, thanks for your explain !

Have a good day
