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
Sorry for my english i’m french and this is my first com in an english forum
Victor
No problem, I’m french as well
here is your fix: https://www.babylonjs-playground.com/#JJHYZI#9
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 !
the beginAnimation will start all animation. The key for animation2 will be out of scope and thus will be in repeat mode
ok, thanks for your explain !
Have a good day
1 Like