How to animate camera position with GSAP

Hi I am trying to animate camera position with GSAP using Below code.

let tween = gsap.to(camera.position, {
          duration: 4,
          x: 0,
          y: 0,
          z: 0,
          ease: "Power0.easeNone",
          onStart: function () {
            console.log("animation_started");
          },
          onUpdate: function () {
            console.log("animation_ongoing");
          },
          onComplete:function(){
            console.log("animation_completed");
          }
        });
        tween.play();

All logs are working fine. But the camera doesn’t get any changes.

Hey, actually the camera.position is read only for some cameras (like ArcRotateCamera which is using alpha, beta and radius)

1 Like

Thanks for your reply @Deltakosh . But I did that with the use of BABYLON.CreateAndStartAnimation(). Then Why We couldn’t do that using GSAP