scene.removeAnimationGroup not working

This is sample playground

As you can see bottom of code.

after 1 second, All of AnimationGroup have to remove from scene.

But character keep dancing.

1 Like

animationgroup’s dispose function doesn’t stop the animation group. It should probably do that :slight_smile:

I am addressing it here - AnimationGroup start should restart if an animatable is available by RaananW · Pull Request #15267 · BabylonJS/Babylon.js (

1 Like

Hi RaananW.

Thank you very much for the quick response.

I thought that disposing of an object would also stop the animation, as it removes the animation itself.

So, how can I remove the animationGroup that is applied to a mesh?
I tried using scene.removeAnimationGroup(scene.getAnimationGroupByName(animationName)) , but it didn’t work.

Below is another one exameple

I believe it should be stopped as well, this is why it was added in the PR (and merged). So in the next version of the framework, dispose will also stop the animation.

I am not sure I understand this.

You can call scene.stopAllAnimations, or stop the animation group yourself before disposing it.

1 Like