Playing Nomalized AnimationGroup with Negative SpeedRatio

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

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

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! :slight_smile:

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.

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.

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