Hi there !
I found an issue in the AnimationGroup documentation.
https://doc.babylonjs.com/typedoc/classes/BABYLON.AnimationGroup
Take a look at this playground.
Click pause while the box is moving. The box stops moving. The method used is pause.
Now click play and you’ll see the box resume its animation from where it stopped. The method used is restart.
The restart
of AnimationGroup documentation states :
Restart animations from key 0
But it seems it’s not the case. The play
method documentation also states :
Play all animations to initial state This function will start() the animations if they were not started or will restart() them if they were paused
Which I think suggests the current behavior is the correct one.
In this playground, an animation group is used to move the cube left then up using two animations that start at the same time, but end at different times.
Now change the restart
method used in the button to the play
method.
If you pause the animation while the cube is going up and click play, the animation will restart entirely because the first animation making the cube move to the left ended. This makes the play
method quite confusing to me and I think it’s possibly behaving wrong.
I hope i’ve been clear enough. and thanks in advance for looking at this.