2 Questions about AnimationGroup : isAdditive and loopAnimation

Hi all!

I have 2 questions about AnimationGroup.

Question1: Can I apply animations additively with the same target and the same property in one animationGroup?
In my PG, in one animation a box moves left to right and in the other it moves right to left.
So I expected the box stays in the middle but it didn’t. (only the first animation was applied)
So I wonder if I made a mistake or it is just purposed!

Question2: How can I loop an animationGroup?
After creating an animationGroup and before playing it, I set that animationGroup’s loopAnimation to true like below.

animationGroup1.loopAnimation = true

Also when creating the animations, I set animations’ loopMode to BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE, but it didn’t work… :cry:
So, can someone let me know how to loop an animationGroup?

Here is my Playground!
https://playground.babylonjs.com/#MAC3I2#34

Thanks in advance!

just add
animationGroup1.start(true);
but your animation is not connect naturally

2 Likes

@11128 Thanks for your help!

2 Likes

Glad to be of help.

2 Likes