# Playing Nomalized AnimationGroup with Negative SpeedRatio

**URL:** <https://forum.babylonjs.com/t/playing-nomalized-animationgroup-with-negative-speedratio/25494>\
**Category:** Questions\
**Created:** [November 23, 2021, 7:05am UTC](https://forum.babylonjs.com/t/playing-nomalized-animationgroup-with-negative-speedratio/25494 "2021-11-23T07:05:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ynnek](https://avatars.discourse-cdn.com/v4/letter/y/c68b51/32.png) [@ynnek](https://forum.babylonjs.com/u/ynnek)\
**Post date:** [November 23, 2021, 7:05am UTC](https://forum.babylonjs.com/t/playing-nomalized-animationgroup-with-negative-speedratio/25494/1 "2021-11-23T07:05:32Z")

</div>

Hi all!  
I have some problems with playing animationGroup backward.

I used an animationGroup that has keys from 0 frame to 4.3 frame.  
And I want to play it from 0 to 6, so I normalized it before starting the animationGroup.

What I want to do is

1. to play the animationGroup `forward` by `pressing 1`
2. to play the animationGroup `backward` by `pressing 2`
3. to toggle the play direction by `pressing 1 and 2 alternately`

When I do it on the BABYLON Playground, it works.  
(You can check the PG below.)

Playground URL  
[https://playground.babylonjs.com/#1LNFP0#38](https://playground.babylonjs.com/#1LNFP0#38)

But when I do this on any other environments, it doesn’t work…  
The animationGroup can animate backward only for the times as same as the count it animates forward.  
(You can check the codepen below.)

Codepen URL  
https://codepen.io/kennycha/embed/preview/eYEaRRM?default-tabs=js%2Cresult&height=300&host=https%3A%2F%2Fcodepen.io&slug-hash=eYEaRRM

So I wonder is there any special settings for Engine or Scene to do this…

There is no bug when I don’t need to normalize the animationGroup (for example when I play it from 0 frame to 4 frame),  
So I think the bug might be related to normalizing an animationGroup and playing it backward at the same time…

Is there anyone to help me to solve this problem?

Thanks in advance! 🙂

---

<div class="post-metadata">

**Author:** ![ynnek](https://avatars.discourse-cdn.com/v4/letter/y/c68b51/32.png) [@ynnek](https://forum.babylonjs.com/u/ynnek)\
**Post date:** [November 23, 2021, 7:50am UTC](https://forum.babylonjs.com/t/playing-nomalized-animationgroup-with-negative-speedratio/25494/2 "2021-11-23T07:50:42Z")

</div>

Or is the problem related to the version of BABYLON?

If so, how can I update the version of `@babylonjs/core` via npm or cdn?  
As far as I know, the version remains as 4.x.x in npm and cdn.

---

<div class="post-metadata">

**Author:** ![ynnek](https://avatars.discourse-cdn.com/v4/letter/y/c68b51/32.png) [@ynnek](https://forum.babylonjs.com/u/ynnek)\
**Post date:** [November 23, 2021, 8:02am UTC](https://forum.babylonjs.com/t/playing-nomalized-animationgroup-with-negative-speedratio/25494/3 "2021-11-23T08:02:31Z")

</div>

I got to know it was because of the version of Babylon.js.  
It works well with the Babylon 5.0.0.  
I used cdn like below.

```auto
<script src="https://preview.babylonjs.com/babylon.js"></script>
<script src="https://preview.babylonjs.com/loaders/babylonjs.loaders.min.js"></script>

```
