Animation doesn't work after scene rotation

A question about animation.
I use one for the animation for TransformNode:

      const rootNode = new TransformNode('Root Container', scene);
      setRootNode(rootNode);

      const transformContainer = new TransformNode('Transform Container', scene);
      transformContainer.parent = rootNode;
.......
------
movingInSpace: () => {
      console.log("movingInSpace started");
      _startWalkingAvatar();

      /*********animations*************/
      var frameRate = 20;
      var rotate = new Animation("rotate", "rotation.y", frameRate, Animation.ANIMATIONTYPE_FLOAT, Animation.ANIMATIONLOOPMODE_CONSTANT);
    	var rotate_keys = []; 

      rotate_keys.push({
          frame: 0,
          value: 0
      });
      rotate_keys.push({
          frame: 15 * frameRate,
          value: - 2 * Math. PI
      });
      rotate.setKeys(rotate_keys);

      /*******Run Clips**********/
      var nextAnimation = function() {
        // _stopWalkingAvatar
        const walkAnim = scene.getAnimationGroupByName("walk");
        if(walkAnim) {
          walkAnim.stop();
        }
      }
      scene.beginDirectAnimation(rootNode, [rotate], 0, 25 * frameRate, false, 1, nextAnimation);
      console.log("movingInSpace finished");
    },

It works well the first time.
But when I rotate the scene with the mouse, animation doesn’t work anymore…

Hi igorroman777,

I’m having a little trouble understanding what the goal is. Can you perhaps repo your problem in a Playground so we can inspect it directly?

Just a guess, but are you setting somehow the rotationQuaternion? Then your animation would stop working on rotation.y. If that’s the case, you can use a quaternion animation instead of Animation.ANIMATIONTYPE_FLOAT. Can you make a playground?

I have my code here. But it does not work as I want it to. Avatar must run after pressing “W”:

https://playground.babylonjs.com/#8LFTCH#1152

I.e. after this code my animation no longer works:

      const handlePointerInput = (deviceSource: DeviceSource, event: IMouseEvent) => {
        ...
        rootNode.rotate(Vector3.Down(), event.movementX * 0.005);
      }

here works by the way. After the animation I rotate the scene with the mouse. After that I start the animation, it runs at the beginning:

https://playground.babylonjs.com/#2L26P1#276

Hello @igorroman777 just checking in, are you still having issues? I tried opening this playground: Available Mesh SeaGulf | Babylon.js Playground (babylonjs.com) but I don’t see an animation.