# The correct way to extend an animation group?

**URL:** <https://forum.babylonjs.com/t/the-correct-way-to-extend-an-animation-group/48181>\
**Category:** Questions\
**Tags:** animationgroups\
**Created:** [February 21, 2024, 6:42am UTC](https://forum.babylonjs.com/t/the-correct-way-to-extend-an-animation-group/48181 "2024-02-21T06:42:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antony](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/antony/32/34501_2.png) [@Antony](https://forum.babylonjs.com/u/Antony)\
**Post date:** [February 21, 2024, 6:42am UTC](https://forum.babylonjs.com/t/the-correct-way-to-extend-an-animation-group/48181/1 "2024-02-21T06:42:01Z")

</div>

I want to extend an animation group by freeze in a particular moment for a certain period of time. I tried to iterate the keys of all animations, and add to the ‘frame’ property with the desired number of frame count, it does freeze the animation group, but the animation group’s ‘to’ property is still old. I have tried to stop, reset or normalize the animation group but it doesn’t work. Anyone’s got the hint of the correct way to do it? Thanks.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 21, 2024, 9:16am UTC](https://forum.babylonjs.com/t/the-correct-way-to-extend-an-animation-group/48181/2 "2024-02-21T09:16:19Z")

</div>

Can’t you use `animGroup.goToFrame(frame)`? If you want to stop at this frame, you can call `animGroup.pause()` just after.

---

<div class="post-metadata">

**Author:** ![Antony](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/antony/32/34501_2.png) [@Antony](https://forum.babylonjs.com/u/Antony)\
**Post date:** [February 21, 2024, 10:32am UTC](https://forum.babylonjs.com/t/the-correct-way-to-extend-an-animation-group/48181/3 "2024-02-21T10:32:43Z")

</div>

Yes this is possible if just for playback. But my usecase is I would also export the modified animation group to a new glb file, so I need to actually update it.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 21, 2024, 12:59pm UTC](https://forum.babylonjs.com/t/the-correct-way-to-extend-an-animation-group/48181/4 "2024-02-21T12:59:49Z")

</div>

Rereading your first post, it seems you only need to be able to set the from / to properties of the animation group. I think this is something worthwhile, so here’s the PR :

> <https://github.com/BabylonJS/Babylon.js/pull/14797>
>
> See https://forum.babylonjs.com/t/the-correct-way-to-extend-an-animation-group/4…8181

---

<div class="post-metadata">

**Author:** ![Antony](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/antony/32/34501_2.png) [@Antony](https://forum.babylonjs.com/u/Antony)\
**Post date:** [February 22, 2024, 12:55am UTC](https://forum.babylonjs.com/t/the-correct-way-to-extend-an-animation-group/48181/5 "2024-02-22T00:55:05Z")

</div>

Yes this should solve the problem. Thank you so much Evgeni 😄
